Utility function to create a new tree Node
class newNode : NEW_LINE INDENT def __init__ ( self , data ) : NEW_LINE INDENT self . data = data NEW_LINE self . left = self . right = None NEW_LINE DEDENT DEDENT def isLeaf ( t ) : NEW_LINE INDENT return ( ( t . left == None ) and ( t . right == None ) ) NEW_LINE DEDENT