Transpose and Flatten

  • + 0 comments

    import numpy as np

    n,m = input().split() arr = [] for i in range(int(n)): num = list(map(int, input().split())) arr.append(num) myarr = np.array(arr) print(np.transpose(myarr)) print(myarr.flatten())