Possible Duplicate:
Unexpected feature in a Python list of lists
I want to make a list of lists in Python, but apparently this doesn't work, as changing one number changes several. Why is this, and how can I fix it?
>>> a = [[0]*3]*4
>>> a[0][0] = 1
>>> a
[[1, 0, 0], [1, 0, 0], [1, 0, 0], [1, 0, 0]]