(root: TreeNode, result = None)
return result
Prints the tree constructed in inorder format
Prints the tree constructed in inorder format
Prints the tree constructed in inorder format
def print_inorder(root: TreeNode, result = None):
    """
        Prints the tree constructed in inorder format
    """
    if root is None:
        return []
    if result is None: 
        result = []
        
    print_inorder(root.left, result)
    result.append(root.val)
    print_inorder(root.right, result)
    return result
def print_inorder ( root : TreeNode , result = None ) : if root is None : return [ ] if result is None : result = [ ] print_inorder ( root . left , result ) result . append ( root . val ) print_inorder ( root . right , result ) return result