Loops with Ranges

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:

  1. The range specified with .. generates the values, including the upper limit. For example, 0..100 generates values 00 to 100100.

Get hands-on with 1200+ tech skills courses.