展開雙層嵌套的iterable類:
LIST = np.arange(15).reshape([3,5]).tolist()
l = [item for sub_list in LIST for item in sub_list] # 從左到右執(zhí)行
展開雙層嵌套的iterable類:
LIST = np.arange(15).reshape([3,5]).tolist()
l = [item for sub_list in LIST for item in sub_list] # 從左到右執(zhí)行