range() is a buitin function. From the help document
range(...)
range([start,] stop[, step]) -> list of integers
Return a list containing an arithmetic progression of integers.
range(i, j) returns [i, i+1, i+2, ..., j-1]; start (!) defaults to 0.
When step is given, it specifies the increment (or decrement).
For example, range(4) returns [0, 1, 2, 3]. The end point is omitted!
These are exactly the valid indices for a list of 4 elements.
Now if you want to see this help message on your system type
help(range) in the python interpreter.
help(s) will return help message on the object
s. Examples of
range function
>>> range(1,5)
[1, 2, 3, 4]
>>> range(1,15,3)
[1, 4, 7, 10, 13]
>>> range(10)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]