# range()

*noun*

say it: **“RAYNJ”** **/reɪndʒ/**

A built-in Python function that makes a series of whole numbers, stopping before the end number, most often to repeat something a set number of times.

## What does `range()` do?

`range()` makes a series of numbers, most often to repeat something a set number of times. It stops before the end number.

```python
for lap in range(1, 4):
    print("Lap", lap)   # Lap 1, Lap 2, Lap 3
```

## In a sentence

- “for lap in **range**(1, 4) prints Lap 1, Lap 2 and Lap 3.”
- “**range()** with a step of 2 counted the even seat numbers.”

Level: Apprentice · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=2)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/range
