Question: 1.1 Problem 1 1.1.1 Part A Write a function that takes a list of lists and flattens it, removing the inner brackets ons might say.

1.1 Problem 1 1.1.1 Part A Write a function that takes a list of lists and flattens it, removing the inner brackets ons might say. Here is an example. Suppose the intput is [[1,2,3,4,5), [100], ['a','b', 'c'], ['x', 'y']] Then the output should be: L2 = [1,2,3,4,5,100, "a", "b", "c", 'x', 'y'] 1.1.2 Part B Same as above, except that the list me have some elements that are not lists, which should be left alone. For Example, with intput M [[1,2,3,4,5], [100], 'Stuff', ['a', 'b', 'c'], ['x', 'y'], 1000] The output should be M2 = [1,2,3,4,5,100,"Stuff", "a", "b", "c", 'x', 'y', 1000]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
