How make a flat list out of a list of lists?

 flat_list = [item for sublist in l for item in sublist]

Example:

l = [[1, 2, 3], [4, 5, 6], [7], [8, 9]] flat_list = [item for sublist in l for item in sublist] flat_list