最後活躍 1715843167

修訂 f296d5545f20ccd78a6e387a481d7b0bea52e6ad

q22.py 原始檔案
1# Using NumPy, write a program to create 1-dimensional array, load it with numbers, and perform the operation of
2# iteration and slicing on it.
3
4import numpy as np
5
6print(arr := np.array([2, 3, 4, 1, 7, 6]))
7for e in np.nditer(arr):
8 print(e, end=" ")
9print()
10print(arr[2:5])
11