Python range(): Represent Numerical Ranges
A range is a Python object that represents an interval of integers. Usually, the numbers are consecutive, but you can also specify that you want to space them out. You can create ranges by calling range() with one, two, or three arguments, as the following examples show: In each example, you use list() to explicitly list the individual elements of each range. You’ll study these examples in more detail soon. A range can sometimes be a powerful tool. However, throughout […]
Read more