Junior — Senior
Deep recursive unpacking of arguments
livecode
Task condition
It is necessary to write a function flatten that accepts an arbitrary number of parameters of different types and transforms them into a single flat sequence. Dictionaries (dict) should be ignored, and nested structures can have any depth.
flatten(1, 2, [3, 4, [5, 0], 7], 8, ('A', {'B', 'C'}))
# → 1 2 3 4 5 0 7 8 'A' 'B' 'C' (elements from set can appear in any order)