说我有:
H = [array(a), array(b), array(c)...]
a = [[1,2,3,4,5,6],
[11,22,33,44,55,66], #row 1 of H[0]
[111,222,333,444,555,666]]
b = [[7,8,9,0,1,2],
[77,88,99,00,11,22],
[777,888,999,000,111,222]]
c = ...
Run Code Online (Sandbox Code Playgroud)
我想访问 H[0] 的第 1 行,然后继续访问 H[1] 中的行,依此类推。
我的问题:
1) 如何调用 H[0] 的第 1 行?
2) 那么,在遍历 H[0] 中的所有行后,我如何使循环运行到 H[1]?
我知道我需要类似的东西
for i in range(len(H)):
do stuff to rows until the last row in H[i]
move onto H[i+1]
do same stuff
stop when (criteria here reached)
Run Code Online (Sandbox Code Playgroud)
感谢所有帮助。谢谢你。
编辑:我现在知道我可以访问它,H[0][1]但我实际上需要数组每一行中的第 0 列值。所以,我需要11从H[0][1]. 我该怎么做呢?