Python program for swapping the value of two integers without third variable
So here is the code:
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') print('HENCE WE SWAPED THE VALUE WITHOUT USING THIRD VARIABLE')
Output:
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
So here is the code:
Output:

need an explanation for this answer? contact us directly to get an explanation for this answer