In Python3
If I have some complex lists such like:
[1, [2, 3], [4, 5, 6]]
or maybe looks like:
[1, [2, [3]], 4, [5, 6]]
I‘m sure there is no repeat value in this list, but I don't know what the list's exactly structure is.
how can I extract the values (recursive) from this complex uncertain list? I want to get a plain list consist of these values:
[1, 2, 3, 4, 5, 6]
Is there any elegant way to solve this issue?