Answers for "Flatten List in Python Using NumPy Reshape"

0

Flatten List in Python Using NumPy Reshape

import numpy as np
List = np.array([[2,6,1], [3,9,4], [5,7,8]])
result = List.reshape(-1)
print(result)
Posted by: Guest on April-10-2022

Python Answers by Framework

Browse Popular Code Answers by Language