Solution
The range() function creates a sequence of numbers. In a for loop, it is used to repeat a block of code a specific number of times, or to generate the numbers to iterate over.
For example, range() can be used to print even numbers from to , or to print the first multiples of . The loop variable takes each value from the sequence in turn, and the loop body runs once for each value.