我做了 i 矩阵 5x3
field = []
fields = []
for i in range(0,5):
for j in range(0,3):
x = 1
field.append(x)
fields.append(field)
当我想更改一个字段时
fields[2][2] = 0
我明白了:
fields[0][0] = 1
fields[0][1] = 1
fields[0][2] = **0**
fields[1][0] = 1
fields[1][1] = 1
fields[1][2] = **0**
fields[2][0] = 1
fields[2][1] = 1
fields[2][2] = **0**
fields[3][0] = 1
fields[3][1] = 1
fields[3][2] = **0**
fields[4][0] = 1
fields[4][1] = 1
fields[4][2] = **0**
相反,我得到了五个改变