今日学到一个优雅的转换二维数组a为一维数组的方法: 新建一个数组双重循环遍历列表推断: res = [i for raw in a for i in raw] reduce函数式编程: reduce(operator.add,a) sum(a,[])flatten(a)