# sample 1
a = [1,2,3]
a[:] = [4,5,6]
print(a)
>>> [4,5,6]
# sample 2
a = [1,2,3]
a[:].append(4)
print(a)
>>> [1,2,3]
Why could this happen? The address of a and a[:] is different, why they are connected? What is the difference between these 2 solutions?