March 2003
Intermediate to advanced
656 pages
39h 30m
English
xrange
xrange([start,]stop[,step=1])
Returns a sequence object whose items are integers in arithmetic
progression. The arguments are the same as for
range, covered in this section. While
range creates and returns a normal list object,
xrange returns a sequence object of a special
type, meant only for use in a for statement.
xrange consumes less memory than
range for this specific, frequent use, although
the performance difference is usually small.