Site icon Matistics

Python – program for Swapping the values using a THIRD variable

#Swapping the values using a third variable
x = int(input("Input A\n"))
y = int(input("Input B\n"))
z = x
x = y
y = z
print(f"A: {x} B: {y}")

Exit mobile version