You can use isin() function of numpy to find the indices. Have a look at the following example.
>>> aa=[1,2,3,4,5,6,7,8,9,10]>>> bb = [2,5,7]>>> import numpy as np>>> np.isin(aa,bb)array([False, True, False, False, True, False, True, False, False, False])>>> np.isin(aa,bb).nonzero()[0]array([1, 4, 6], dtype=int64)>>>