Is there a way to get array elements in one operation for known rows and columns of those elements? In each row I would like to access elements from col_start to col_end (ea
I think you're looking for something like the below. I'm not sure what you want to do with them when you access them though.
indexes = [(4,6), (0,2), (2,4), (8, 10)]
arr = [
[ . . . . | | | . . . . . ],
[ | | | . . . . . . . . . ],
[ . . | | | . . . . . . . ],
[ . . . . . . . . | | | . ]
]
for x in zip(indexes, arr):
index = x[0]
row = x[1]
print row[index[0]:index[1]+1]