using range() in for loops

AndyL ask at me
Wed Apr 5 09:16:37 EDT 2006


Paul Rubin wrote:
> Normally you'd use range or xrange.  range builds a complete list in
> memory so can be expensive if the number is large.  xrange just counts
> up to that number.

so when range would be used instead of xrange. if xrange is more 
efficient, why range was not reimplemented?




More information about the Python-list mailing list