[Tutor] xrange

Alan Gauld alan.gauld at btinternet.com
Wed Mar 19 01:59:48 CET 2008

"Kent Johnson" <kent37 at tds.net> wrote

>> Add a 3rd step-value argument to range. (You don't need the xrange
>> on modern versions of Python BTW)
> Only if by 'modern' you mean Python 3; on Python 2.x there is a
> difference between range() and xrange(). Though for a list of 20 
> ints I
> don't think it matters much.

Ah! I thought the unification happened when generators were introduced
I didn't realised it was put back to v3. Thanks for the pointer Kent.

Alan G. 

More information about the Tutor mailing list