[EMAIL PROTECTED] wrote: > What's the difference between xrange and range?
range() creates a list object and fills it in up front, xrange() returns a sequence-like object that generates indexes on demand. for short loops, this difference doesn't really matter. for large loops, or if you usually don't run the loop until the end, xrange() can be more efficient. xrange() also lets you do things like: for x in xrange(sys.maxint): ... if some condition: break without running out of memory. </F> -- http://mail.python.org/mailman/listinfo/python-list