python知识点讨论

先给出两段代码:

>>> list1 = [1,2,3]
>>> list2 = list1
>>> list1 = list1 + [4,5]
>>> list1, list2

>>> list1 = [1,2,3]
>>> list2 = list1
>>> list1 +=  [4,5]
>>> list1, list2

他们分别是什么,为什么??  微笑 ,期待大家的参与。  等会我会给出正确答案。

你可能感兴趣的:(list,python)