#交换a和b的值 a=34 b=57 #经典方法,利用一个中间值 temp=a a=b b=temp #在Python中可以一行代码实现 a,b=b,a 转载于:https://www.cnblogs.com/YURiCA/p/10840456.html