Whats wrong?


Replace this line with your code. 
n = [[1, 2, 3], [4, 5, 6, 7, 8, 9]]
# Add your function here
def flatten(lists):
    results = []
    for numbers in lists:
        for i in numbers:
        return results    
print flatten(n)


a function ends the moment a return keyword is reached.

this loop:

for numbers in lists

will only run once, since in the first iteration of this loop, a return keyword is reached

you might want to change the indent of return so both loops can run completely


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