listEx = ['cat *(select: "Brown")*', 'dog', 'turtle', 'apple']
listEx2 = ['hampter',' bird', 'monkey', 'banana', 'cat']
for j in listEx2:
for i in listEx:
if j in i:
print listEx.index(j)
What I am trying to accomplish is search the items in listEx2 in listEx. If the item from listEx2 is found in listEx, I would like to know how to print the index value of the item found from listEX2 in listEx. Thanks!
'cat'to be found because it is contained within'cat *(select: "Brown")*'?listExcontaining the string "cat"? Do you want the index of all of them?