I\'ve already searched SO for how to flatten a list of lists (i.e. here:Making a flat list out of list of lists in Python) but none of the solutions I find addresses flatten
For this particular case,
In [1]: [sum(x,[]) for x in my_list] Out[1]: [[1, 2, 3, 4, 5], [9, 8, 9, 10, 3, 4, 6], [1]]
is the shortest and the fastest method:
In [7]: %timeit [sum(x,[]) for x in my_list] 100000 loops, best of 3: 5.93 µs per loop