Skip to content

Glossary: Coding with AI Assistants

List comprehension

Also written: list comprehensions

A one-line way to build a list, such as `[line_total(sku, q) for sku, q in lines]`. It can end with an `if` to filter.

Where the book teaches it

Related terms

tuple unpacking