I have a array as follows, and I would like to change the value of the middle entry of the second row.
array = [[0, 0, 0],
[0, 0, 0],
[0, 0, 0]]
array[1][1] = 1
expected output:
[[0, 0, 0],
[0, 1, 0],
[0, 0, 0]]
however, it seems like the value of the whole column is changed:
[[0, 1, 0],
[0, 1, 0],
[0, 1, 0]]
Why does this not work? How do I just change the value of the entry that I want?
Thanks!