predict=[[1,2],[3,4],[5,6,7]] predict = [i for j in predict for i in j] print (predict) 输出: [1, 2, 3, 4, 5, 6, 7]