Iterator Of List Of List Of Iterables
I would like to iterate of a list of list of Iterables in Python3. Stated differently, I have a matrix of iterables and I would like to loop through and get at each iteration a mat
Solution 1:
Obviously you can zip
the iterators in each sublist together, you're just missing how to zip
the resulting iterators together. I would unpack a generator expression:
for t inzip(*(zip(*l) for l in a)):
print(t)
((1, 11, 21), (101, 111, 121))
((2, 12, 22), (102, 112, 122))
...
Post a Comment for "Iterator Of List Of List Of Iterables"