Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (12 sloc) 261 Bytes
# Python Program to Swap Two Variables Using Temporary Variable
x = 5
y = 7
print("Before Swapping: ")
print("Value of x = ", x)
print("Value of y = ", y)
temp = x
x = y
y = temp
print("After Swapping: ")
print("Value of x = ", x)
print("Value of y = ", y)
You can’t perform that action at this time.