import numpy as np List = np.array([[2,6,1], [3,9,4], [5,7,8]]) result = List.reshape(-1) print(result)