visualize_tree_3.py 172 B

12345
  1. def levels(self, min_level=0):
  2. """An iterator over levels, yields all the nodes in each level"""
  3. for i in range(min_level,self.depth):
  4. yield self.level(i)