Glossary: Python Beyond the Basics
shallow copy
Also written: shallow, copy, copy()
A copy of the outer list or dict only, so mutable items inside it are still shared with the original. `.copy()`, `list(x)` and `x[:]` make shallow copies.
Glossary: Python Beyond the Basics
Also written: shallow, copy, copy()
A copy of the outer list or dict only, so mutable items inside it are still shared with the original. `.copy()`, `list(x)` and `x[:]` make shallow copies.