>>> a = [1,2,[3,4]]
>>> b =a
>>> b
[1, 2, [3, 4]]
>>> a.append(5)
>>> a[2].append(5)
>>> a
[1, 2, [3, 4, 5], 5]
>>> b
[1, 2, [3, 4, 5], 5] # a中任何变化,b会跟着变
>>> import copy
>>> a = [1, 2, [3, 4]]
>>> b = copy.copy(a)
>>> b
[1, 2, [3, 4]]
>>> a.append(5)
>>> a[2].append(5)
>>> a
[1, 2, [3, 4, 5], 5]
>>> b
[1, 2, [3, 4, 5]] # b复制了a,但每个元素是引用过来的,所以改变a不会影响b,但改变元素会影响b
>>> import copy
>>> a = [1, 2, [3, 4]]
>>> b = copy.deepcopy(a)
>>> b
[1, 2, [3, 4]]
>>> a.append(5)
>>> a[2].append(5)
>>> a
[1, 2, [3, 4, 5], 5]
>>> b
[1, 2, [3, 4]] #复制完成后,不再与a有任何关系