Answers for "transpose of a matrix in python lists"

1

python transpose list of lists

import numpy as np
a = [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
np.array(a).T.tolist()
Posted by: Guest on January-08-2022
3

python transpose list

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

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

transpose_list = transpose.tolist()
Posted by: Guest on June-08-2020

Code answers related to "transpose of a matrix in python lists"

Python Answers by Framework

Browse Popular Code Answers by Language