How to convert listof list into single list without import

list, python, python-2.7

Solution

Using list comprehension:

>>> a = [[1,2], [23,51,6], ["Hi", "hello"]]
>>> [x for xs in a for x in xs]
[1, 2, 23, 51, 6, 'Hi', 'hello']

Problem

My list is: ``` a = [[1,2], [23,51,6], ["Hi", "hello"]] ``` I want ouput: ``` a = [ 1,2,23 51,6, "Hi", "hello"] ```

Original source