Driver code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT root = None NEW_LINE root = insert ( root , 20 ) NEW_LINE insert ( root , 10 ) NEW_LINE insert ( root , 5 ) NEW_LINE insert ( root , 15 ) NEW_LINE insert ( root , 30 ) NEW_LINE insert ( root , 25 ) NEW_LINE insert ( root , 35 ) NEW_LINE print ( " Inorder ▁ before ▁ Deleting ▁ the ▁ leaf ▁ Node . " ) NEW_LINE inorder ( root ) NEW_LINE leafDelete ( root ) NEW_LINE print ( ) NEW_LINE print ( " INorder ▁ after ▁ Deleting ▁ the ▁ leaf ▁ Node . " ) NEW_LINE inorder ( root ) NEW_LINE DEDENT