Trouble understanding python syntax for assigning variables
This question already has an answer here:
a, b = b, a + b
is the equivalent of
a = b; b = a + b
a = b; b = a + b
except this would use the new value of a
when assigning to b
, not the original as intended.
上一篇: 在同一行上打印数字范围
下一篇: 无法理解分配变量的Python语法