vert_join¶
full name: tenpy.tools.string.vert_join
parent module:
tenpy.tools.string
type: function
-
tenpy.tools.string.
vert_join
(strlist, valign='t', halign='l', delim=' ')[source]¶ Join strings with multilines vertically such that they appear next to each other.
- Parameters
strlist (list of str) – the strings to be joined vertically
valing (
't', 'c', 'b'
) – vertical alignment of the strings: top, center, or bottomhalign (
'l', 'c', 'r'
) – horizontal alignment of the strings: left, center, or rightdelim (str) – field separator between the strings
- Returns
joined – a string where the strings of strlist are aligned vertically
- Return type
Examples
>>> print vert_join(['a\nsample\nmultiline\nstring', str(np.arange(9).reshape(3, 3))], ... delim=' | ') a | [[0 1 2] sample | [3 4 5] multiline | [6 7 8]] string