skbio.tree.TreeNode.is_tip#

TreeNode.is_tip()[source]#

Check if the current node is a tip of a tree.

Returns:
bool

Whether the node is a tip.

Examples

>>> from skbio import TreeNode
>>> tree = TreeNode.read(["((a,b)c);"])
>>> print(tree.is_tip())
False
>>> print(tree.find('a').is_tip())
True