http://docs.python.jp/3/tutorial/controlflow.html#the-range-function
Such objects are called iterables. These are good targets for functions and constructors to sequentially give as many items as possible. We have already seen that the for statement is such an iterator. The function list () is another example. This will generate a list from the iterable:
>>> list(range(5))
[0, 1, 2, 3, 4]
Recommended Posts