How do we write code to print elements containing 'a' in myarray
myarray = np.array([
[['car','jeep','bus'],['cat','dog','rat']],
[['apple','orange','banana'],['London','New York','Paris']]
])
I have tried using this method but I did not get any output.
import numpy as np
myarray = np.array([
[['car','jeep','bus'],['cat','dog','rat']],
[['apple','orange','banana'],['London','New York','Paris']]
])
for i in range(0, len(myarray)):
print(i[0])
if 'i' in myarray:
print(myarray[0])
else:
continue