# Import numpy as np
import numpy as np
#for x in my_array : #in 1D Numpy array
#for x in np.nditer(my_array) : #for 2D Numpy array
# For loop over np_height
for x in np_height:
print(str(x) + " inches")
# For loop over np_baseball
for x in (np.nditer(np_baseball)):
print(x)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter