a = 3

b = 5

第一种:引入变量

c = 0

c = a
a = b
b = c
print(a, b)

第二种:运算运算

a = a + b
b = a - b
a = a - b

print(a, b)

第三种:交换值

a, b = b, a

print(a, b)