# Indentation

*noun*

say it: **“in-den-TAY-shun”** **/ˌɪndɛnˈteɪʃən/**

The spaces at the start of a line; Python uses them to group code into blocks, with every line in a block indented by the same amount, usually 4 spaces.

## What is **indentation** in Python?

**Indentation** is the spaces at the start of a line. Python uses it to group code: every line in the same block is indented by the same amount, usually 4 spaces.

```python
for name in ["Ana", "Ben"]:
    print("Hello", name)   # runs for each name
print("Done")              # runs once, after the loop
```

## In a sentence

- “An IndentationError means the **indentation** of a line doesn't match its block.”
- “The **indentation** shows which lines belong to the loop.”

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

Updated: November 19, 2026

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