Can any body figure out the problem?


#1

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)


#2

Here:

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:


#3

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