function to transpose a matrix in python and print code example
Example: transpose matrices numpy
import numpy as np
A = [1, 2, 3, 4]
np.array(A).T # .T is used to transpose matrix
import numpy as np
A = [1, 2, 3, 4]
np.array(A).T # .T is used to transpose matrix