Here, we will figure out how to swap the estimation of two whole numbers without utilizing the third factor in Python?
In this article, we will figure out how to swap the estimation of two numbers without utilizing an alternate (third) factor? In this issue, we are going to investigate another component of the tuple in python.
One basic advance, two distinct factors and it’s everything done.
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')