python 3 list.flatten code example
Example 1: flatten list of lists python
flat_list = [item for sublist in t for item in sublist]
Example 2: flatten lists python
flat_list = []
for sublist in l:
for item in sublist:
flat_list.append(item)