In Python 2, range function returns a list while xrange creates a special xrange object, which is an immutable sequence, which unlike other built-in sequence types, doesn't support slicing and has neither index nor count methods:
Python 2.x2.3
print(range(1, 10))
# Out: [1, 2, 3, 4, 5, 6, 7, 8, 9...