Код: Выделить всё
listB = [1,2,3,4,5]
listA = [listB[0], listB[1]]
print(listA[0]) #returns 1
listB[0] = 0
print(listA[0]) #still returns 1
Код: Выделить всё
listB = [1,2,3,4,5]
listA = [listB[0], listB[1]]
print(listA[0]) #returns 1
listB[0] = 0
print(listA[0]) #still returns 1