a=[[1,2,3],[4,5,6]] b=[[row[i] for row in a] for i in range(len(a[0]))] print(b) 输出: [[1, 4], [2, 5], [3, 6]]