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]