# Generator Expression

say it: **“JEN-uh-ray-ter ek-SPRESH-un”** **/ˈdʒɛnəreɪtər ɪkˈsprɛʃən/**

Like a list comprehension in round brackets, producing values one at a time.

## What is a **generator expression**?

A **generator expression** looks like a list comprehension with round brackets, but it produces values one at a time instead of building a whole list.

```python
prices = [12.5, 8.0, 30.0]
total = sum(price * 1.07 for price in prices)   # no list is built
print(round(total, 2))  # 54.04
```

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

Updated: November 17, 2026

Source: https://www.ask-codey.com/glossary/generator-expression
