Write a program for swapping the value of two integers without third variable


Topic: Write a program for swapping the value of two integers without third variable

Solution

x = int(input("Enter the value of x :"))
y = int(input("Enter the value of y :"))
(x,y) = (y,x)
print('Value of x: ', x, '\nValue of y: ', y, '\nWOO!! Values SWAPPEDDD')



List all Python Programs