'Using a list of lists in a function' suggest error


#1


https://www.codecademy.com/courses/python-beginner-nzzVa/4/2?curriculum_id=4f89dab3d788890003000096

Oops, try again. flatten([[1, 2], [3, 4]]) returned [[1, 2], [1, 2], [3, 4], [3, 4]] instead of [1, 2, 3, 4]


n = [[1, 2, 3], [4, 5, 6, 7, 8, 9]]
def flatten(lists):
    results = []
    for lst in lists:
        for item in lst:
            results.append(lst)
    return results
print flatten(n)

output :- [[1, 2, 3], [1, 2, 3], [1, 2, 3], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 9]]
None


#2

I got it
this is right

n = [[1, 2, 3], [4, 5, 6, 7, 8, 9]]
def flatten(lists):
results = []
for lst in lists:
for item in lst:
results.append(item)
return results
print flatten(n)


#3