import numpy
N, M = map(int,raw_input().split())
my_array = numpy.array( [map(int, raw_input().split()) for i in range(N)] )
print numpy.transpose(my_array)
print my_array.flatten()
Subscribe to:
Post Comments (Atom)
import numpy
N, M = map(int,raw_input().split())
my_array = numpy.array( [map(int, raw_input().split()) for i in range(N)] )
print numpy.transpose(my_array)
print my_array.flatten()
We guarantee you won't get any other SPAM
import numpy
ReplyDeleten, m = map(int, input().split())
array = numpy.array([input().strip().split() for _ in range(n)], int)
print (array.transpose())
print (array.flatten())
ITS WORKING
Delete