itertools.chain.from_iterable can take a generator