📜  python list transpose - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:44.076000             🧑  作者: Mango

代码示例2
# Use numpy. T to transpose a list of lists, from kite.com

list_of_lists = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

numpy_array = np.array(list_of_lists)
transpose = numpy_array.T
transpose `numpy_array`

transpose_list = transpose.tolist()