In this python basic program, we will interchange values between variables.
Steps to solve the program
- Take two variables as input and assign value to them.
- Interchange their values using “, = “.
- Print the variables after interchanging the values.
a = 10
b = 20
a,b = b,a
print("a: ",a)
print("b: ",b)
Output :
a: 20
b: 10