Answers for "how to print transpose of a matrix in python"

1

transpose a matrix in python

matrix = ((0, 1), (3, 4), (6, 7))
#Transpose matrix from 3x2 to 2x3

matrix_transpose = tuple(zip(*data))
print(data_transpose)

#Output
((0, 3, 6), (1, 4, 7), (2, 5, 8))
Posted by: Guest on August-21-2021
0

transpose matrix python

arr = list(list(x) for x in zip(*arr))
Posted by: Guest on August-03-2020

Code answers related to "how to print transpose of a matrix in python"

Python Answers by Framework

Browse Popular Code Answers by Language