On Oct 17, 2021, at 3:40 AM, Serhiy Storchaka email@example.com wrote:
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.
Serhiy: could you explain the difference?