18 list of lists can see what is wrong



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:
        return results

print flatten(n)


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


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


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


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


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