human
Give me a code to how to swap two numbers without using a temporary variable given the following:
How to swap two numbers without using a temporary variable ? | Swap function.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to how to swap two numbers without using a temporary variable .
 def swap ( xp , yp ) :
	xp [ 0 ] = xp [ 0 ] ^ yp [ 0 ]
	yp [ 0 ] = xp [ 0 ] ^ yp [ 0 ]
	xp [ 0 ] = xp [ 0 ] ^ yp [ 0 ]
x = [ 10 ]
swap ( x , x )
print ( " After ▁ swap ( & x , ▁ & x ) : ▁ x ▁ = ▁ " , x [ 0 ] )