So, consider the following:
iterable1 = (foo.value for foo in foos)
iterable2 = (bar.value(foo) for foo in foos)
Since both iterators are created from the same list .. I was wondering if I could generate them together.
like
compounded_iter = ( (foo.value,bar.value(foo)) for foo in foos)
The above work.
But is it possible to get something like:
iter1, iter2 = (......) but in one shot?
I can’t understand this.
source
share