Simple console sequence:
>>> A=[]; B=[]
>>> A.append(1)
>>> A
[1]
>>> A=[]
>>> A
[]
>>> B.append(A)
>>> B
[[]]
so far so expected. B ist now a list containing one element, which is an empty list. A is an empty list. Let's continue:
>>> A.append(1)
>>> A
[1]
>>> A=[]
>>> A
[]
A has the same value as first time. Now the surprise (to me at least):
>>> B.append(A)
>>> B
[[1], []]
>>>
Why ???? How and where ist the previous content of A, the 1, stored, and why is [1] pre(!!)pended to B instead of another empty list being appended ?