Loading...

The Flat Mapper

A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
medium
Seniority
junior, mid

Problem

Given a list that contains a mix of integers and nested lists of integers, return a flat list containing all integers in order. Only one level of nesting needs to be handled - you do not need to recurse into deeper nesting.

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.