>>> A=[[1,2,3], [4,5,6], [7,8] , [9,10]] # A is a list of lists >>> [x for y in A for x in y] # dissolves the inner brackets [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] >>>