Swapping values

#!/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

Recommended for you