like a "for loop" for a string
google at mrabarnett.plus.com
Mon Aug 18 00:05:45 CEST 2008
On Aug 17, 8:40 pm, bearophileH... at lycos.com wrote:
> 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().
If it was introduced into Python v3.x then wouldn't it have to be
called str.split in order to be consistent with xrange -> range? :-)
More information about the Python-list