Performing a shallow copy
suggest changeA shallow copy is a copy of a collection without performing a copy of its elements.
>>> import copy
>>> c = [[1,2]]
>>> d = copy.copy(c)
>>> c is d
False
>>> c[0] is d[0]
True
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents