Notes

Rotating a NxN Matrix in One Line of Python

July 27, 2019

data = [
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9],
]
[[r[i] for r in data[::-1]] for i in range(len(data))]
[print(r) for r in data]