memory problem with list creation

Stefan Behnel stefan_ml at behnel.de
Wed Jan 13 09:36:20 EST 2010


Allard Warrink, 13.01.2010 15:24:
> I found out that when i populated the lists with floats using a for ... in
> range() loop a lot of overhead memory is used

Note that range() returns a list in Python 2.x. For iteration, use 
xrange(), or switch to Python 3 where range() returns an iterable.

Stefan



More information about the Python-list mailing list