Transpose a matrix
Write transpose(matrix) that flips a -of- over its diagonal: rows become columns. The matrix may be non-square.
Examples
transpose([[1, 2, 3], [4, 5, 6]]) → [[1, 4], [2, 5], [3, 6]]
Exercise
4 checksTranspose a matrix
def transpose(matrix):
...
print(transpose([[1, 2, 3], [4, 5, 6]]))
Press Run to try your code, then Check answer to grade it.