Function to print the tree in a pre - order traversal pattern
def print_tree ( root ) : NEW_LINE INDENT if not root : NEW_LINE INDENT return NEW_LINE DEDENT print ( root . data , end = ' ▁ ' ) NEW_LINE print_tree ( root . left ) NEW_LINE print_tree ( root . right ) NEW_LINE DEDENT