# items()

*noun*

say it: **“EYE-temz”** **/ˈaɪtəmz/**

A dictionary method that hands back every key with its value as pairs, so a loop can use both at once.

## What does **items()** do?

**items()** is a dictionary method that gives back each key together with its value, as pairs. In a `for` loop you
can name both halves at once.

```python
stock = {"apples": 12, "pears": 0}
for fruit, count in stock.items():
    print(f"{fruit}: {count}")
# apples: 12
# pears: 0
```

## In a sentence

- “Using **items()** saved her from looking up every value by its key.”
- “The loop over **items()** printed each player's name beside their score.”

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/items
