Transpose and Flatten

  • + 0 comments

    import numpy N, M = list(map(int, input().strip().split())) my_array = numpy.array([input().strip().split()[:M] for _ in range(N)], dtype=int) print(numpy.transpose(my_array)) print(numpy.sort(numpy.transpose(my_array).flatten()))