range() is not the best way to check range?

Stefan Behnel stefan.behnel-n05pAM at web.de
Tue Jul 18 08:42:38 EDT 2006


Andy Dingley wrote:
> The purpose of range() in Python is as loop control,

No, the purpose of range() is to create a list, as the docs state.

http://docs.python.org/lib/built-in-funcs.html

"""
range(...) - This is a versatile function to create lists containing
arithmetic progressions.
"""

Stefan



More information about the Python-list mailing list