GNU Info

Info Node: (python2.1-lib.info)XRange Type

(python2.1-lib.info)XRange Type


Next: Mutable Sequence Types Prev: String Formatting Operations Up: Sequence Types
Enter node , (file) or (file)node

XRange Type
...........

The xrange  type is an immutable sequence which is commonly used for
looping.  The advantage of the xrange type is that an xrange object
will always take the same amount of memory, no matter the size of the
range it represents.  There are no consistent performance advantages.

XRange objects behave like tuples, and offer a single method:

`tolist()'
     Return a list object which represents the same values as the xrange
     object.


automatically generated by info2www version 1.2.2.9