Flatten Arbitrarily Nested Lists

easy
Unit 7 · Datetime I0/3 to milestone

Write a generator flatten(items) that yields every non-list element of an arbitrarily nested list, in order. Tuples should be treated as atoms (not flattened).

#recursion#generators2 visible + 1 hidden tests
solution.py · Python 3.13
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Flatten Arbitrarily Nested Lists · TechGradify