Using Pandas:
import pandas as pd l = [[1, 2, 3], [4, 5, 6], [7], [8, 9]] list(pd.DataFrame({'lists':l})['lists'].explode())
[1, 2, 3, 4, 5, 6, 7, 8, 9]
Or with list comprehensions:
l = [[1, 2, 3], [4, 5, 6], [7], [8, 9]] [item for sublist in l for item in sublist]
[1, 2, 3, 4, 5, 6, 7, 8, 9]