python中交换两个数值

方法一:
a,b=3,4
a,b=b,a
print(a,b)

方法二:
a=1
b=5
c=a
a=b
b=c
print(a,b)

4 3
5 1