Write a Python Program to Swap Two Variables and print them


Topic: Write a Python Program to Swap Two Variables and print them

Solution

x = 5
y = 10
temp = x
x = y
y = temp
print('The value of x after swapping: {}'.format(x))
print('The value of y after swapping: {}'.format(y))



List all Python Programs