1. Home
  2. Computing & Technology
  3. Python

XRange Type

By Al Lukaszewski, About.com

The xrange() Type:

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

XRange objects support indexing, iteration, and the len() function.

Explore Python

More from About.com

  1. Home
  2. Computing & Technology
  3. Python
  4. Python Library
  5. Python Modules - Python Built-In Functions - XRange Type

©2008 About.com, a part of The New York Times Company.

All rights reserved.