I have a nested list A = [1,2,3,[4,5,[6,7,8]]] I want to convert A into a list [1,2,3,4,5,6,7,8]. How can I do this? There is a restriction that i don't have to hardcode it.
Asked
Active
Viewed 23 times
1
-
1What have you tried ? – Chiheb Nexus Jun 01 '18 at 02:22
-
1Exact dupe: https://stackoverflow.com/q/2158395/2988730. The name of the operation you are looking for is "flatten". – Mad Physicist Jun 01 '18 at 02:24