Python references

前端 未结 5 1459
盖世英雄少女心
盖世英雄少女心 2020-11-29 10:00

Can someone explain why the example with integers results in different values for x and y and the example with the list results in x and y being the same object?

<         


        
5条回答
  •  臣服心动
    2020-11-29 10:45

    The best explanation I ever read is here: http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#other-languages-have-variables

提交回复
热议问题