Alternative to standard C "for"

Paul Rubin http
Sat Feb 5 13:45:09 EST 2005


adomas.paltanavicius at gmail.com writes:
> problem. If i do ..in range(1, 100000000).. (what I really need
> sometimes), it takes few hundred megs of memory and slows
> down. Are there other good ways for this simple problem? Generators?

use xrange instead of range.



More information about the Python-list mailing list