How to swap two numbers without using a temporary variable ? | Swap function ; Driver code
def swap ( xp , yp ) : NEW_LINE INDENT xp [ 0 ] = xp [ 0 ] ^ yp [ 0 ] NEW_LINE yp [ 0 ] = xp [ 0 ] ^ yp [ 0 ] NEW_LINE xp [ 0 ] = xp [ 0 ] ^ yp [ 0 ] NEW_LINE DEDENT x = [ 10 ] NEW_LINE swap ( x , x ) NEW_LINE print ( " After ▁ swap ( & x , ▁ & x ) : ▁ x ▁ = ▁ " , x [ 0 ] ) NEW_LINE