def show_2d(self): ''' Show a pretty 2D tree based on the output of bfs_order_star(). None values are are replaced by stars ('*'). For example, consider the following tree `t`: 10 5 15 * * * 20 The output of t.bfs_order_star() should be: [ 10, 5, 15, '*', '*','*', 20 ] '''I already got the function bfs_order_star() working like it should. That is a function that returns an array with all of the nodes from a tree in breadth-first traversal, where the empty nodes are declared as '*'.
Any ides how I can write a function that prints a 2D tree based on the data from that array?