like a "for loop" for a string

bearophileHUGS at bearophileHUGS at
Sun Aug 17 21:40:51 CEST 2008

Eric Wertman:
> So what exactly does that do?  Returns a generator, instead of a list?

Allows you to iterate on the parts in a lazy way, without creating the
whole list of the pieces.
The arguments are the same of str.split().


More information about the Python-list mailing list