Given a list with lists nested inside it, return the list with the nested lists' items de-nested.
Input
The list will have, at most, 4-deep nested lists. Count all 0's within the input as a null space.
Output
Individually print out each item. Do not print out the output as a list. You can seperate each item with any kind of whitespace.
Example Cases
[[1, 0], [2, 0], [2, 3]] -> 1 2 2 3
[[[4, 5, 8]], [[5, 6, 20]], [[1, 20, 500]]] -> 4 5 8 5 6 20 1 20 500
[[[1, 0], [0, 0], [0, 0]], [[1, 0], [1, 2], [2, 0]], [[2, 0], [0, 0], [0, 0]]] -> 1 1 1 2 2 2
The shortest code wins.
[[[[5]]]]
, right? \$\endgroup\$[[[[5]]]]
works on tio.run/… but not on tio.run/… \$\endgroup\$Count all 0's within the input as a null space.
meanignore zeros
\$\endgroup\$