Well,
I am not good with list comprehensions. Yet...
Here is a new one.
In [3]: [doubled.extend(list(i)) for i in zip(l, l)] Out[3]: [None, None, None, None, None, None, None, None, None, None] In [4]: doubled Out[4]: [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]works but returns None after any iteration. It's basically the same as in the previous post.
I am not good with list comprehensions. Yet...
Here is a new one.
In [88]: [x for i in zip(l, l) if doubled.extend(list(i)) != None] Out[88]: [] In [89]: doubled Out[89]: [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]