# for Loop

*noun*

say it: **“FOR loop”** **/ˈfɔr lup/**

A Python loop that repeats a block of code once for each item in a collection, such as each guest in a list.

## What is a **for loop** in Python?

A **for loop** repeats a block of code once for each item in a collection.

```python
for guest in ["Ana", "Ben", "Cai"]:
    print(f"Welcome, {guest}!")
```

## In a sentence

- “A **for loop** over range(1, 11) prints the numbers 1 to 10.”
- “The **for loop** welcomed each guest by name.”

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

Updated: November 19, 2026

## In other subjects

- [for Loop in C#](https://www.ask-codey.com/glossary/for-loop-c-sharp)
- [for Loop in Java](https://www.ask-codey.com/glossary/for-loop-java)
- [for Loop in JavaScript](https://www.ask-codey.com/glossary/for-loop-javascript)
- [for Loop in PowerShell](https://www.ask-codey.com/glossary/for-loop-powershell)
- [for Loop in Unix](https://www.ask-codey.com/glossary/for-loop-unix)

Source: https://www.ask-codey.com/glossary/for-loop
