← Questions
Flatten and rebuild nested Python containers
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Given an arbitrarily nested mix of lists, tuples and dicts with integer leaves, produce a flat list of the integers in order. Then, given the original structure and a new flat list, rebuild a structure of the same shape filled with the new values.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding
