You are viewing a single comment's thread. Return to all comments →
import numpy as np
x = list(map(int, input().split())) a = [] for i in range(x[0]): a1 = list(map(int,input().split())) a.append(a1)
a = np.array(a)
print(np.transpose(a)) print(a.flatten())
Seems like cookies are disabled on this browser, please enable them to open this website
Transpose and Flatten
You are viewing a single comment's thread. Return to all comments →
import numpy as np
x = list(map(int, input().split())) a = [] for i in range(x[0]): a1 = list(map(int,input().split())) a.append(a1)
a = np.array(a)
print(np.transpose(a)) print(a.flatten())