Python——交换变量值的两种方式

1. 方法一:

三次交换,不说了

2. 方法二

a,b = 1,2
a,b = b,a

猜你喜欢

转载自blog.csdn.net/weixin_44441131/article/details/107105992
今日推荐