Can any body figure out the problem?


n = [[1, 2, 3], [4, 5, 6, 7, 8, 9]]

Add your function here

def flatten(n):
results = []
for lists in n:
for numbers in n:
results = n.append(numbers)
return results

print flatten(n)



It should be for numbers in list.

You should also watch this:

Wouldn't it be safe to just append to results straight away?

I hope this helps! :wink:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.