# Binary tree node
class node:
def __init__(self, data):
self.left=None
self.right=None
self.data=data
# Function to create a new
# Binary node
def newNode(data):
return node(data)
def t():
root=newNode("A")
root.left = newNode("B")
root.right = newNode("C")
root.left.left = newNode("D")
root.left.right = newNode("G")
root.right.right = newNode("E")
root.right.right.left = newNode("F")
print(t)
Hi, I have tried to create a Binary Tree above but I did not managed to print out the binary tree when I print "t".
Instead of a Binary Tree, it shows me this:

tis a function... Did you mean to call it -t()? Still you will not see anything printed, becausetdoesn't print anything...t. The thing is, even if you did, it still wouldn't print out anything meaningful. What do you want to print out?