This is the error message in the console:
Traceback (most recent call last):
File "python", line 12, in
File "python", line 6, in flatten
NameError: global name 'numbers' is not defined
I'm not terribly sure where I'm going wrong. It has to be with the iterations, I'm guessing.
Have tried different combinations. And getting similar error.
I understand what we're trying to do, or at least, I think I do.
Thanks for any help!
n = [[1, 2, 3], [4, 5, 6, 7, 8, 9]] # Add your function here def flatten(lists): results = [ ] for n in lists: for i in numbers: results = results.append(n) return results print flatten(n)