Transpose and Flatten

  • + 0 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())