Assign other value to a variable from two possible values | Function to alternate the values ; Driver code
def alternate ( a , b , x ) : NEW_LINE INDENT x = a ^ b ^ x NEW_LINE print ( " After ▁ exchange " ) NEW_LINE print ( " x ▁ is " , x ) NEW_LINE DEDENT a = - 10 NEW_LINE b = 15 NEW_LINE x = a NEW_LINE print ( " x ▁ is " , x ) NEW_LINE alternate ( a , b , x ) NEW_LINE