Python Programming: Swapping two numbers using Function

def swap(a,b):
    a,b=b,a
    print("After swapping","a=",a," b=",b)
a=10
b=20
print("Before swapping a=",a," and b=",b)
swap(a,b)

Comments