Driver code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT root = Node ( 10 ) NEW_LINE root . left = Node ( 11 ) NEW_LINE root . left . left = Node ( 7 ) NEW_LINE root . left . right = Node ( 12 ) NEW_LINE root . right = Node ( 9 ) NEW_LINE root . right . left = Node ( 15 ) NEW_LINE root . right . right = Node ( 8 ) NEW_LINE print ( " The ▁ tree ▁ before ▁ the ▁ deletion : " ) NEW_LINE inorder ( root ) NEW_LINE key = 11 NEW_LINE root = deletion ( root , key ) NEW_LINE print ( ) NEW_LINE print ( " The ▁ tree ▁ after ▁ the ▁ deletion ; " ) NEW_LINE inorder ( root ) NEW_LINE DEDENT