I'm trying to change the value of one cell in a 2D python array:
[[0, 1, 2], [0, 1, 2], [0, 1, 2]]
which I generated from
m=3*[[0]*3]
for y in xrange(0,3):
for x in xrange(0,3):
m[y][x]=x
I want to replace m[0][0] with 5 so that it looks like
[[5, 1, 2], [0, 1, 2], [0, 1, 2]]
but instead it is
[[5, 1, 2], [5, 1, 2], [5, 1, 2]]
when i use
m[0][0]=5
what's going on?