Python · Lesson 8.1 · Pro

List comprehensions

Build a new list from an old one in a single readable line.

In this lesson

  1. Transform every item
  2. Keep only some items
  3. Transform and filter together
  4. Pick a column from records