Shallow Copy and Deep Copy in Python 3

Опубликовано: 06 Август 2019
на канале: Stack Equation
2,194
14

The copying process occurs recursively in a deep copy. A new collection is first created, then it gets recursively populated with copies of child objects found in the original.

Shallow copying is not recursive unlike deep copy, a new collection object is constructed and it's populated with references to the child objects found in the original, however, these are only references, not the actual copies itself.