Lists & Comprehensions in Python: interview exercises

Lists & Comprehensions in Python: 8 test-checked interview exercises (Filter and transform in one pass), each beside a worked example, with tests as you go. Free.

  1. Filter and transform in one pass
  2. Unique, ascending
  3. Chunk into groups
  4. Flatten deeply
  5. Rotate right by k
  6. Transpose with zip(*rows)
  7. Merge overlapping intervals
  8. Max sum of k consecutive

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