>>> a=50;b=60  #两行写成一行,用分号分割

>>> print(a,b)

50 60

>>> a,b=b,a  #交换两个变量的值

>>> print(a,b)

60 50

>>> 


评论
 
© 软件交流 | Powered by LOFTER