I am having some problems with this lesson, but I don't fully understand my error....
n = [[1, 2, 3], [4, 5, 6, 7, 8, 9]] # Add your function here def flatten(lists): results =  for numbers in lists: for item in numbers: results.append(item) return results print flatten(lists)
Traceback (most recent call last): File "python", line 9, in <module> File "python", line 6, in flatten TypeError: 'int' object is not iterable
Line 9 is
and line 6 is
for numbers in lists:
If someone could please explain the ''int' object is not iterable' part to me I think that I would understand more as to why my code doesn't work. I don't understand where the 'int' comes in, because there are no integers used in lines 6 or 9.