執行深層複製

如果你有巢狀列表,則還希望克隆巢狀列表。此操作稱為深層複製。

>>> import copy
>>> c = [[1,2]]
>>> d = copy.deepcopy(c)
>>> c is d
False
>>> c[0] is d[0]
False