A little more advanced for loop
Aahz
aahz at pythoncraft.com
Sat Feb 10 16:07:50 EST 2007
In article <45CCF734.3080306 at websafe.com>,
Larry Bates <larry.bates at websafe.com> wrote:
>
>Note: if lists are long take a look at itertools izip. zip creates
>a list of lists which could take lots of memory/time if they are VERY
>large. itertools izip iterates over them in place.
That's half-true -- while izip is faster, it's not enough faster to make
a significant difference unless the lists are "huge" rather than
"large". Remember that the data elements themselves are not copied.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"I disrespectfully agree." --SJM
More information about the Python-list
mailing list