Top "Xrange" questions

xrange is a Python function that, unlike the traditional 'range' function, creates an iterator object rather than a list.

NameError: global name 'xrange' is not defined in Python 3

I am getting an error when running a python program: Traceback (most recent call last): File "C:\Program Files (x86)\…

python python-3.x range runtimeexception xrange
What is the difference between range and xrange functions in Python 2.X?

Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far …

python loops range python-2.x xrange
Why is there no xrange function in Python3?

Recently I started using Python3 and it's lack of xrange hurts. Simple example: 1) Python2: from time import time as t …

python python-3.x pep xrange
changing default x range in histogram matplotlib

I would like to change the default x range for the histogram plot. The range of the data is from 7 …

python matplotlib histogram xrange
Name 'xrange' is not defined in Python 3

I try to execute following code but can't with mistake: name 'xrange' is not defined pages = ( requests.get( build_group_…

python python-3.x range xrange
Iterating in a closed range [a, b] in python

I want to iterate over a closed range of integers [a, b] in python, ie. iterating from a to b …

python loops iterator range xrange
Is there an equivalent of Pythons range(12) in C#?

This crops up every now and then for me: I have some C# code badly wanting the range() function available …

c# python range xrange
What is faster for loop using enumerate or for loop using xrange in Python?

What is faster, a for loop using enumerate or using xrange? EDIT: I have tested, and I just see minimal …

python loops xrange
`xrange(2**100)` -> OverflowError: long int too large to convert to int

xrange function doesn't work for large integers: >>> N = 10**100 >>> xrange(N) Traceback (most recent call …

python python-3.x range biginteger xrange