yield all entries of an iterable

Sebastian sebastianspublicaddress at googlemail.com
Thu Oct 21 00:27:54 CEST 2010

Is there a simpler way to yield all elements of a sequence than this?
for x in xs:
    yield x

I tried googling but fond only the other direction (turning a generator
into a list with "list(my_generator())".


More information about the Python-list mailing list