vert_join
full name: tenpy.tools.string.vert_join
parent module:
tenpy.tools.stringtype: function
- tenpy.tools.string.vert_join(strlist, valign='t', halign='l', delim=' ')[source]
Join multiline strings vertically such that they appear next to each other.
- Parameters:
- Returns:
joined – a string where the strings of strlist are aligned vertically
- Return type:
Examples
>>> from tenpy.tools.string import vert_join >>> 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 |