python 实现把一维的序列循环赋值给二维的序列问题,求助
a = [0,0,0,0]b = []
for i in range(4):
a[3] = ib.append(a)
print b
想实现的是:[[0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 2], [0, 0, 0, 3]]
可是实际是:[[0, 0, 0, 3], [0, 0, 0, 3], [0, 0, 0, 3], [0, 0, 0, 3]]
求问哪里有问题?
相关分类