# len()

say it: **“LEN”** **/ˈlɛn/**

Tells you how many items something has.

## What does `len()` do?

`len()` tells you how many items something has: letters in a string, items in a list, and so on.

```python
print(len("pizza"))           # 5
print(len(["eggs", "milk"]))  # 2
```

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

Updated: November 17, 2026

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