18 list of lists can see what is wrong


#1



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


it only apperas the first 3 elements of the list


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 number in numbers:
            results.append(number)
        return results

print flatten(n)


#2

Indentation problem... The return is not at "the right place"


#3

it's a backspace thank's, but in other exercicies it had to be in that place


#4

Yeah.. In python the number of indentations can change the whole logic... It all depends on your algorithm.


#5

in this case it had to be in same line that the first for cycle , right ??


#6

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