Create a function called flatten that takes a single list and concatenates all the sublists that are part of it into a single list. 1 On line 3, define a function called flatten with one argument called lists. 2 Make a new, empty list called results. 3 Iterate through lists. Call the looping variable numbers. 4 Iterate through numbers. 5 For each number, .append() it to results. 6 Finally, return results from your function.
def flatten(lists): results =  for numbers in lists: results.append(numbers) return results print flatten(n)
Oops, try again. flatten([[1, 2], [3, 4]]) returned [[1, 2], [3, 4]] instead of [1, 2, 3, 4]
I dont know how it's possible to do task exactly correct, but in return got errors...