- = only let two pointers point to the same object
- copy only copies the object itself, not the sub-objects in it, so the modification of the sub-objects will also follow the modification.
- Deepcopy is a true copy, that is, to open up a new space. The copy we often say is actually deepcopy.
>>> import copy
>>> a=[1,2,3,[2,3],4]
>>> b=a
>>> c=copy.copy(a)
>>> d=copy.deepcopy(a)
>>> a.append(9)
>>> a
[1, 2, 3, [2, 3], 4, 9]
>>> b
[1, 2, 3, [2, 3], 4, 9]
>>> c
[1, 2, 3, [2, 3], 4]
>>> d
[1, 2, 3, [2, 3], 4]
>>> a[3][0]=8
>>> a
[1, 2, 3, [8, 3], 4, 9]
>>> b
[1, 2, 3, [8, 3], 4, 9]
>>> c
[1, 2, 3, [8, 3], 4]
>>> d
[1, 2, 3, [2, 3], 4]
>>>