def transpose(matrix):
#FOLLOWING is my code, it is incorrect however. COULD ANY GIVE ME A HAND?
O(∩_∩)OThanks :)
l=len(matrix)
i=0
j=0
Aj=[]
T=[]
for i in range(l):
Ai=matrix
li=len(Ai)
i+=1
for j in range(li):
Aij=Ai[j]
j+=1
for i in range(l):
Aj.append(Aij)
i+=1
for j in range(li):
T.append(Aj)
j+=1
return T
JasonQiao 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.