143. Python Program to find Transpose of the given Matrix.
How does this program work?
- In this program we are going to learn about how to find transpose of the given matrix using Pyhton.
- Transpose of a matrix is obtained by changing rows to columns and columns to rows of given matrix.
Here is the code
X = [[12,7],
[4 ,5],
[3 ,8]]
result = [[0,0,0],
[0,0,0]]
for i in range(len(X)):
for j in range(len( X[0])):
result[j][i] = X[i][j]
for r in result:
print(r)