PythiloMedium · 25 min · Task 66 of 100 · progress kept in this browser

Rotate a square matrix

Return a new matrix rotated clockwise by 90 degrees. Input is square; empty input returns [].

matrix = [[1, 2], [3, 4]]
n, row, column = 2, 0, 1
print(matrix[n-1-column][row])
Your task

Return a new matrix rotated clockwise by 90 degrees. Input is square; empty input returns [].