📜  python flatten one liner - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:00.086000             🧑  作者: Mango

代码示例1
#The list of lists
list_of_lists = [range(4), range(7)]

#flatten the lists
flattened_list = [y for x in list_of_lists for y in x]