Loading...
The Lazy Unpacker
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- mid, senior
Problem
A memory-efficient ETL pipeline needs to stream values out of deeply nested structures without loading everything into memory. Given a nested list of arbitrary depth, implement a generator that yields each non-list element one at a time. Return the result as a list for testing.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.