How would I turn a generator of pairs (tuples):
tuple_gen = (i for i in [(1, "a"), (2, "b"), (3, "c")])
Into two generators which would yield [1, 2, 3] and ["a", "b", "c"]?
I need to process separately the first and second elements of the tuples and the processing functions expect an iterable.
The generator is very large (millions of items) so I'd like to avoid having all items in memory at the same time unless there is no other solution.