Question: Write a Python function that takes a list that contains regular elements and other lists and returns a new list that has no sublists (it
Write a Python function that takes a list that contains regular elements and other lists and returns a new list that has no sublists (it is "flattened"). Bonus: make your program be able to deal with lists whose sublists also have sublists.
Example: [[1,2], 3, 4] -> [1, 2, 3, 4] Bonus Example: [[[1, 2], 3,], 4, 5, 6]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
