skbio.tree.TreeNode.__str__#

TreeNode.__str__()[source]#

Return string version of self, with names and distances.

Returns:
str

Returns a Newick representation of the tree

See also

read
write

Examples

>>> from skbio import TreeNode
>>> tree = TreeNode.read(["((a,b)c);"])
>>> str(tree)
'((a,b)c);\n'