Fork me on GitHub"

# skbio.tree.TreeNode.levelorder

`TreeNode.``levelorder`(include_self=True)

  Performs levelorder iteration over tree

  State: Experimental as of 0.4.0.

  Parameters:

  include_self : bool

  > include the initial node if True

  Yields:

  TreeNode

  > Traversed node.

  See also

  `traverse`, `postorder`, `preorder`, `pre_and_postorder`, `tips`, `non_tips`

  Examples

      >>> from skbio import TreeNode
      >>> tree = TreeNode.read(["((a,b)c,(d,e)f);"])
      >>> for node in tree.levelorder():
      ...     print(node.name)
      None
      c
      f
      a
      b
      d
      e