HackerRank- Python Transpose and Flatten



Print the transpose and flatten results.



  1. import numpy
  2. n, m = map(int, input().split())
  3. array = numpy.array([input().strip().split() for _ in range(n)], int)
  4. print (array.transpose())
  5. print (array.flatten())

download android app