When I define a list in a "generic" way:
>>>a=[[]]*3
>>>a
[[],[],[]]
and then try to append only to the second element of the outer list:
>>>a[1].append([0,1])
>>>a
[[[0,1]], [[0,1]], [[0,1]]]
it appends to all elements of the outer list as can be seen above, probably due to the fact that the elements are references to the same list and not different lists (why does it work that way?). How can I actually create a list in the same "generic" way, such that the inner lists would be different lists and not just references. Thanks.