list1 = [
[0,1,2,3,4],
[0,1,2,3,4]
]
list2 = list1.copy()
for i in range(len(list2)):
list2[i].pop(0)
print(list1)#[[1, 2, 3, 4], [1, 2, 3, 4]]
print(list2)#[[1, 2, 3, 4], [1, 2, 3, 4]]
Copying list1 with copy() method in list2 and removing items from nested lists in list2 it shouldn't remove those items in list1. Why it happens?????