To begin with, this question is not a dup of this one, but builds on it.
Taking the tree in that question as an example,
1
/ \\
2 3
/
For those who are simply interested in visualizing binary trees (and not so much in the theory behind breadth-first search), there is a show
function in the binarytree package. Applied to the example given in the question,
from binarytree import Node, show
root = Node(1)
root.left = Node(2)
root.right = Node(3)
root.left.left = Node(4)
root.right.left = Node(5)
root.right.right = Node(6)
show(root)
which prints
1
/ \
2 3
/ / \
4 5 6