I have this function of a binary tree:
class Tree:
def __init__(self,data):
self.left = None
self.right = None
self.data = None
now I should read out the value of the root node with this approach:
root = Tree("")
And then I will add an element to level three of the tree with this approach:
root.left = Tree("leftChild on Level 3")
Can you guys help me further? Thanks in advance