[Tutor] xrange() with start or stop > sys.maxint?

Alan Gauld alan.gauld at btinternet.com
Thu May 19 19:55:39 CEST 2011


"Terry Carroll" <carroll at tjc.com> wrote

> Is there any way to use xrange with a start or stop value that 
> exceeds sys.maxint?

Not in python v2(*), just use range().
In Python v3 xrange has been removed as has sys.maxint....


(*)Or at least up to 2.5, I don;t have 2.6 or 2.7...

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




More information about the Tutor mailing list