Pythonで入れ子を外す方法2021/6/30 / 1 min readView more blogs with the tag pythonTable of Contents#はじめに#方法はじめに Pythonで入れ子を外す方法です。 方法 list1 = [[1, 2], [3, 4]] list2 = [i for lst in list1 for i in lst]# output: [1, 2, 3, 4]