I am trying to create a matrix transpose function for python but I can\'t seem to make it work. Say I have
theArray = [[\'a\',\'b\',\'c\'],[\'d\',\'e\',\'f\
a=[]
def showmatrix (a,m,n):
for i in range (m):
for j in range (n):
k=int(input("enter the number")
a.append(k)
print (a[i][j]),
print('\t')
def showtranspose(a,m,n):
for j in range(n):
for i in range(m):
print(a[i][j]),
print('\t')
a=((89,45,50),(130,120,40),(69,79,57),(78,4,8))
print("given matrix of order 4x3 is :")
showmatrix(a,4,3)
print("Transpose matrix is:")
showtranspose(a,4,3)