Accessing rows of an array, inside an array of arrays?

Viewed 19380

Say i have:

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 = ...

I want to access row 1 of H[0], but then move onto accessing the rows within H[1] and so on.

My question(s):

1) How do i call on row 1 of H[0]?

2) How do i then, after going through all rows in H[0], make a loop run to H[1]?

I know i need something like

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)

All help is appreciated. Thank you.

Edit: I now know I can access this by H[0][1] but i actually need the 0th column values within each row of the arrays. So, i need 11 from H[0][1]. How do i do this?

3 Answers
Related