3 ms·
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
by RK 15y ago
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).