+ 1
Write a function to swap 2 values. The function takes exactly 2 arguments and returns nothing.
make sure it works with any type of input arguments
3 Respuestas
0
def swap(a,b):
a,b=b,a
print a,b
OR
def swap (a,b):
a=a+b
b=a-b
a=a-b
a=input ("enter num")
b= input ("enter num")
swap(a,b)
0
I want to take user input and swap with functions please..
0
u can simply take input and cal the function