`copy()` only works on the first layer; to copy nested mutable objects you need `deepcopy` from the `copy` module
– ddejohnAug 28 '21 at 22:01
2
Does this answer your question? [What is the difference between shallow copy, deepcopy and normal assignment operation?](https://stackoverflow.com/questions/17246693/what-is-the-difference-between-shallow-copy-deepcopy-and-normal-assignment-oper)
– ddejohnAug 28 '21 at 22:02