Python Language Performing a shallow copy


Example

A 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