Iterators & Generators in Python: interview exercises

Iterators & Generators in Python: 5 test-checked interview exercises (An endless generator), each beside a worked example, with tests as you go. Free.

  1. An endless generator
  2. Chunk any iterable, lazily
  3. Filter a stream, remembering the past
  4. Make a class iterable
  5. A lazy pipeline over lines

Each exercise pairs a worked example with a twin problem to solve in a real editor; the tests run the moment you do. Progress is saved in your browser, and in your account if you sign in.

More Python topics

All Python exercises ยท Other languages and frameworks