repeat loop

A for loop over range(n) whose only purpose is to run its block n times.

In more detail

The loop variable is not used inside the body, so it is often named _. Letting the user type the count, as in range(int(input())), turns it into a flexible repeater.

Related terms

Taught in

References