Archived
matrix anticlockwise rotation
An old note — I haven't updated it since I wrote it.
1m = [[1, 2, 3],
2 [4, 5, 6],
3 [7, 8, 9]]
4
5[*zip(*m)][::-1]
Output:
1[(3, 6, 9),
2(2, 5, 8),
3(1, 4, 7)]
See also:
Archived
1m = [[1, 2, 3],
2 [4, 5, 6],
3 [7, 8, 9]]
4
5[*zip(*m)][::-1]
Output:
1[(3, 6, 9),
2(2, 5, 8),
3(1, 4, 7)]
See also: