Using a list of lists in a function


#1



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


I am experiencing some difficulty with this exercise requiring a function to flatten a list of lists.

My code:

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

generates the following errors which I have been unable to debug

Any suggestions how to resolve this much appreciated.

```


#2

what does i contain? not indexes, but actually items from the list so you can just append i to results.


#3

Brillian!!

Thank you for the speedy response.


#4

#5

Well, the response has to be swift, this is the last week before the course closes and you have to move to the new course