import copy grid = [[1, 2], [3, 4]] shallow = copy.copy(grid) # the inner lists are the SAME objects shallow[0].append(99) print(grid[0])
inner lists are still shared after copy.copy