like a "for loop" for a string

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Sun Aug 17 15:40:51 EDT 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().

Bye,
bearophile



More information about the Python-list mailing list