我想更改矩阵的轴x
和轴。y
例如,我想将每个嵌套数组的第一个元素存储在第一行,将每个嵌套数组的第二个元素存储在第二行等...例如:
list = [[1,2,3,4,5,6] [7,8,9,10,11,12] [13,14,15,16,17,18] [19,20,21,22,23,24]]
我想改成这样:
new list = [[1,7,13,19] [2,8,14,20] [3,9,15,21] [4,10,16,22] [5,11,17,23] [6,12,18,24]]
注意:这不是旋转
萧十郎
相关分类