Bad_Programist

Untitled

Dec 8th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. def printpretty(x):
  2.     for row in x:
  3.         print(' '.join(row))
  4. def Transpose(A, n, m):
  5.     B = [[A[i][j] for i in range(n)] for j in range(m)]    
  6.     return B
  7.    
  8. a = input().split()
  9. c = []
  10. for i in range(int(a[0])):
  11.     b = input()
  12.     c.append(b.split())
  13. printpretty(Transpose(c, int(a[0]), int(a[1])))
Advertisement
Add Comment
Please, Sign In to add comment