There are shallow and deep copies
Shallow copies will switch when the nested destination changes
Deep copy if nested Is it a light copy that doesn't nest?
import copy
copy.copy(pokopoko) #Shallow copy
cpoy.deepcopy(pokopoko) #Deep copy
pokopoko[:] #A shallow copy of the list
I wonder if it's like this
Recommended Posts