What's the fastest way to swap the values bound to two variables? Python?
Answers
Answered by
0
a = input('Enter First Value: ')
b = input('Enter Second Value: ')
print("Value of a before swapping: ", a)
print("Value of b before swapping: ", b)
c = a
a = b
b = c
print("Value of a after swapping: ", a)
print("Value of b after swapping: ", b)
Answered by
2
Similar questions