Driver Code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT root = newNode ( 10 ) NEW_LINE root . left = newNode ( 3 ) NEW_LINE root . right = newNode ( 10 ) NEW_LINE root . left . left = newNode ( 3 ) NEW_LINE root . left . right = newNode ( 1 ) NEW_LINE root . right . right = newNode ( 3 ) NEW_LINE root . right . right . left = newNode ( 3 ) NEW_LINE root . right . right . right = newNode ( 3 ) NEW_LINE deleteLeaves ( root , 3 ) NEW_LINE print ( " Inorder ▁ traversal ▁ after ▁ deletion ▁ : ▁ " ) NEW_LINE inorder ( root ) NEW_LINE DEDENT