>>> a = [1,2,3,45,6,7,8]
>>> b = a
>>> b.append(9)
>>> b
[1, 2, 3, 45, 6, 7, 8, 9]
>>> a
[1, 2, 3, 45, 6, 7, 8, 9]
>>> a.pop()
9
>>> a
[1, 2, 3, 45, 6, 7, 8]
>>> b
[1, 2, 3, 45, 6, 7, 8]
>>>
python里list的赋值,深拷贝
最新推荐文章于 2024-07-29 16:29:49 发布