A utility function to do inorder traversal of BST
def inorder ( root ) : NEW_LINE INDENT if root != None : NEW_LINE INDENT inorder ( root . left ) NEW_LINE print ( " Node ▁ : " , root . key , " , ▁ " , end = " " ) NEW_LINE if root . parent == None : NEW_LINE INDENT print ( " Parent ▁ : ▁ NULL " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " Parent ▁ : ▁ " , root . parent . key ) NEW_LINE DEDENT inorder ( root . right ) NEW_LINE DEDENT DEDENT