How to swap two variables value in python?
For example, If you have a equal to 1 and b equal to 2 then get output a equal to 2 and b equal to 1.
First create c variable then set c equal to a, a equal to b and b equal to c.
Here is code,
a = 1
b = 2
print("OLD a = ",a)
print("OLD b = ",b)
c ...
kingarunesh.hashnode.dev1 min read