A = [[]]*2
A[0].append("a")
A[1].append("b")
B = [[], []]
B[0].append("a")
B[1].append("b")
print "A: "+ str(A)
print "B: "+ str(B)
Yields:
A: [['a', 'b'], ['a', 'b']]
B: [['a'], ['b']]
One would expect that the A list would be the same as the B list, this is not the case, both append statements were applied to A[0] and A[1].
Why?