【Python】多重赋值之值互换

右边的值先确定,然后再开始向左赋值

s = 1
t  = 2
s,t = t,s
print s
print t

>>> 2
>>> 1

区分

s = t
t = s
print s
print t

>>> 2
>>> 2
原文地址:https://www.cnblogs.com/Neo007/p/7406753.html