All challenges
Multiple ChoiceIntermediate 30s

Generator vs List Memory

Choose the best answer for: generator memory
Options
  1. 1Lists are lazy like generators and defer all their work
  2. 2Generators produce values lazily, using less memory
  3. 3Generators store all their values in memory upfront
  4. 4Generators use more memory than lists do for the same data

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle