Comment on Python: copying a list the right wayparentComments−RK14yThe only caveat here is if you are copying a list of lists, you have to use copy.deepcopy() if you want the lists inside your lists to actually be copied.This caught me bad once. I wish it were on the page linked in the post (and others like it).
Comments
The only caveat here is if you are copying a list of lists, you have to use copy.deepcopy() if you want the lists inside your lists to actually be copied.
This caught me bad once. I wish it were on the page linked in the post (and others like it).