Learn about fixed iteration loops that have a large number of iterations with different intervals.
The range as a sequence with ..
and ...
The range is used to generate a sequence of values. It requires a start point and an endpoint to specify the values. There are two kinds of ranges:
- The range specified with
..
generates the values, including the upper limit. For example,0..100
generates values to .
- The range specified with
...
generates the values excluding the upper limit. For example,0...100
generates values to .
It also makes it easy to specify the increment or jump value using the step function. For example, 10..100.step(2)
generates even values between and ...