Skip to content

Glossary: Python Beyond the Basics

generator expression

Also written: generator expressions

A comprehension in parentheses that produces values one at a time instead of building a list, such as `sum(price * 1.2 for price in prices)`.

Where the book teaches it

Related terms

generatorlist comprehension