Python中交互数值时没有使用临时变量的理由。可以使用元组使得互换更加清晰。
foo = 'Foo' bar = 'Bar' temp = foo foo = bar bar = temp
foo = 'Foo' bar = 'Bar' (foo, bar) = (bar, foo)