Swapping values
Python Programming ⚭ Jun 6, 2016 ⚭ 787 views
#!/usr/bin/evn python
a = 5
b = 8
print ('Before swap')
print(a, b)
# Tuples: swaps values
a, b = b, a
print ('After swap')
print(a, b)
# ***** Output *****
Before swap
5 8
After swap
8 5
Learn more about Tuples