How to deep copy a list?
E0_copy is not a deep copy. You don’t make a deep copy using list(). (Both list(…) and testList[:] are shallow copies.) You use copy.deepcopy(…) for deep copying a list. deepcopy(x, memo=None, _nil=[]) Deep copy operation on arbitrary Python objects. See the following snippet – >>> a = [[1, 2, 3], [4, 5, 6]] >>> b … Read more