I built a list like this:

num\_rows and num cols are from list aaa 

```
for i in range(num_rows):
     for j in range(num_cols):
         if (aaa[i][j] == 0):
               bbb.append((i,j))
     pass
pass

```

now I have another 2d list called ccc with floats in. I want to use the tuple from bbb as index for ccc (the specific row and col). I need to do a np.sum after on particular indices. So I have tried something like this:

```
np.sum(ccc[k][l] for (k,l) in bbb)

```

I am new to python and I know it is not right. I barely learned how to write for loops... But is there a way to do something like this?

Thank you all.