if target node found , then enter this condition
if ( root . data == target_node . data ) : NEW_LINE INDENT if ( next == None ) : NEW_LINE INDENT print ( " inorder ▁ successor ▁ of " , root . data , " ▁ is : ▁ None " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " inorder ▁ successor ▁ of " , root . data , " is : " , next . data ) NEW_LINE DEDENT DEDENT next = root NEW_LINE inorderSuccessor ( root . left , target_node ) NEW_LINE next = None NEW_LINE