Performing a deep copy

suggest change

If you have nested lists, it is desireable to clone the nested lists as well. This action is called deep copy.

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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents