Transpose a python matrix
Rotate the matrix in 90 degrees.
Start file
((1, 2, 3, 4), (5, 6, 7, 8), (9, 10, 11, 12), (13, 14, 15, 16))
End file
((1, 5, 9, 13), (2, 6, 10, 14), (3, 7, 11, 15), (4, 8, 12, 16))
View Diff
1,4c1,4 < ((1, 2, 3, 4), < (5, 6, 7, 8), < (9, 10, 11, 12), < (13, 14, 15, 16)) --- > ((1, 5, 9, 13), > (2, 6, 10, 14), > (3, 7, 11, 15), > (4, 8, 12, 16))
Solutions by @mcguire:
Unlock 2 remaining solutions by signing in and submitting your own entry