Added By: Editorial Staff | Last Updated:
Today we are going to share a Python program to find transpose of matrix. If you are a python beginner and want to start learning the python programming, then keep your close attention in this tutorial as I am going to share a Python program to find transpose of matrix.
Copy the below python program and execute it with the help of python compiler.
matrix = [[1, 2],
rmatrix = [[0, 0, 0],
[0, 0, 0]]
for i in range(len(matrix)):
for j in range(len(matrix)):
rmatrix[j][i] = matrix[i][j]
for r in rmatrix:
[2, 6, 10]
[4, 8, 12]
To increase your Python knowledge, practice all Python programs, here is a collection of 100+ Python problems with solutions.
Editorial Staff at FreeWebMentor is a team of professional developers leads by Prem Tiwari View all posts by Editorial Staff