16.10.21 17:07, Erik Demaine пише:
(*it for it in its) # tuple with the concatenation of iterables in 'its'
As others already have said, it should evaluate to a generator, not to a tuple.
But other question is occurred now. Should it be equivalent to
def gen(its): for it in its: for x in it: yield x
def gen(its): for it in its: yield from it
? There is a subtle difference between these codes.