Basic Python Program-1

Write a program to swap two numbers without taking a temporary variable.



a=10
b=20
print ("Before swap")
print (a)
print (b)
c=a+b
a=c-a
b=c-a
print ("After swap")
print (a)
print (b)