Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. def debug_print_child_tree(nodes, root, indent):
  2. print_str = ""
  3. for i in range(indent):
  4. print_str += '\t'
  5.  
  6. print_str += "Node "+str(root)+" Children: "
  7.  
  8. for child in nodes[root].child_set:
  9. print_str += str(child)+","
  10.  
  11. print print_str
  12.  
  13. indent += 1
  14.  
  15. for child in nodes[root].child_set:
  16. debug_print_child_tree(nodes, child, indent)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement