Comprehensions

Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.

The problem

  • easy

A colleague writes a loop that starts with an empty list, goes through orders, and appends the total of each paid order. Explain how a list comprehension could replace it, and when a comprehension stops being a good idea.

Talk this problem through with an AI coach

Sign in with Google to start a free voice session — no credit card needed.

Start free →