I've been stuck with this data structure for a while now:
iter([iter([1,0]),iter([1,1]),iter([0,0])])
I want to get to sum of the inner-most elements using map-reduce/itertools.
I am able to get to the answer fairly quickly using for loops:
outer_iter = iter([iter([1,0]),iter([1,1]),iter([0,0])])
for inner_iter in outer_iter:
for inner_list in inner_iter:
total = total + inner_list
I am struggling to "translate" the code.