I am trying to define a function that transposes a matrix. This is my code:
def Transpose (A):
B = list(zip(*A))
return B
Now when I call the function somewhere in the program like such:
Matrix = [[1,2,3],[4,5,6],[7,8,9]]
Transpose(Matrix)
print(Matrix)
The matrix comes out unchanged. What am I doing wrong?