HOME/Articles/

python code swap values between two variables (snippet)

Article Outline

Python example 'python code swap values between two variables'

python code swap values between two variables

Python code example: python code swap values between two variables


#Swap values between two variables

a = 4
b=6
a,b=b,a
print(a)
print(b)

More Python: https://pythonprogramminglanguage.com