Advertisement
pacho_the_python

Untitled

Jun 14th, 2023
1,060
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. matrix = [
  2.     [1, 2, 3, 4],
  3.     [5, 6, 7, 8],
  4.     [9, 10, 11, 12],
  5.     [13, 14, 15, 16]
  6. ]
  7. tt = []
  8. for i in range(len(matrix)):
  9.     current_row = []
  10.     for j in range(len(matrix)):
  11.         current_row.append(matrix[j][i])
  12.     tt.append(current_row)
  13.  
  14. for k in tt:
  15.     print(*k, sep=" ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement