import numpy as np arr=np.array([1,1,1,134,45,3,46,45,65,3,23424,234,12,12,3,546,1,2]) x=np.where(arr>33)[0] y=np.where(arr<500)[0] print(np.where(arr>33)[0]) print(np.where(arr<500)[0]) print(np.intersect1d(x,y))