Я пытаюсь понять, что происходит, когда я назначаю список (list1) в другую переменную (list2) и объединяю третий список с (list3).
list1 = [3,4]
list2=list1 # shallow copy/hard copy
list1 = list1 + [10,11]
print(list1)
print(list2)
If I apply the Shallow copy or Hard copy concept it should print
[3, 4, 10,10]
[3, 4, 10,11]
But in practice I get
[3, 4]
[3, 4, 10, 11]
Can anyone please explain what is happening in this code snippet? I use Python 3.6