Write a Generator

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
  • Pro

You need to process a log file far too large to fit in memory, line by line, keeping only the error lines. Explain what a generator function is and how you'd use one here.

Talk this problem through with an AI coach

This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.

Start free →