I wonder whether there is a shortcut to make a simple list out of list of lists in Python.
I can do that in a
for loop, but maybe there is some cool "one-liner"? I tried it with reduce, but I get an error.
l = [[1, 2, 3], [4, 5, 6], , [8, 9]] reduce(lambda x, y: x.extend(y), l)
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 1, in <lambda> AttributeError: 'NoneType' object has no attribute 'extend'