Sign inSign in
ConceptSystems & CS

List comprehension

An expression that allows you to very easily construct a list on the fly without using a loop or calling append repeatedly.
Watch it explained

Know first

Named as a prerequisite by the lectures that define this. The number is how many say so. A grey one has no page yet.

Opens up

Concepts that name this one as a prerequisite.

Lecturers

2

Each in their own terms, from the easiest level.

  • Ana Bell

    MIT · Introductory

    A concise one-liner way in Python to create a new list by applying an expression to every element of an iterable that satisfies an optional test condition.
    • 1:04List Comprehension, Functions as Objects, Testing, and Debugging in Python

Lectures that assume it

1

Connections

11

The lectures that define it or assume it, and the concepts next to it.

Concepts8

Show 2 more

2 lecturers. Definitions are written by AI from each lecture’s transcript. A time with a play mark starts the lecture at the moment the lecturer says it.