Coding tools
Learn & compete
Community
Practice
Recursive generator depth-first.
Constraints
Example
>>> list(flatten([1, [2, [3, 4], 5]])) [1, 2, 3, 4, 5]
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints