I'm not entirely sure about this, but I think for range(), the entire range of numbers is generated at one go, which could cause a slow-down. But xrange() generates the list of numbers one at a time. For a thousand, there shouldn't be much of a difference, but if you need a million or so go with xrange() Basu _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
- [Tutor] xrange elis aeris
- Re: [Tutor] xrange Alan Gauld
- Re: [Tutor] xrange elis aeris
- Re: [Tutor] xrange Kent Johnson
- Re: [Tutor] xrange elis aeris
- Re: [Tutor] xrange Shrutarshi Basu
- Re: [Tutor] xrange elis aeris
- Re: [Tutor] xrange Alan Gauld