teplohod's blog

By teplohod, history, 13 months ago, translation, In English
# Поворот матрицы на 90 градусов 
n = int(input())
lst = []
for i in range(n):
    st = list(map(int, input().split()))
    lst.append(st)
for i in lst:
    lst_90 = [[lst[y][x] for y in range(len(lst) — 1, -1, -1)] for x in range(0, len(lst[0]))]

for i in lst_90:
    print('\t'.join(map(str, i)))
  • Vote: I like it
  • +6
  • Vote: I do not like it

| Write comment?