我有一小段代码,执行时会给我一个索引错误。
while True:
for i in range (0,q):
for j in range (0,q):
y[i,j] = Y[i,j+1]-Y[i,j]
z[i,j] = Z[i,j]-Z[i,j+1]
print "y: "+str(y)
print "z: "+str(z)
q = 10
IndexError: index (10) out of range (0<=index<10) in dimension 1
我需要一些帮助。感谢你。