Possible Duplicate:
Python two lists finding index value
listEx = ['cat *(Select: "Standard")*', 'dog', 'cow', 'turtle *(Select: "Standard")*', 'onion', 'carrot *(select: "Standard")*']
listEx2 = ['house', 'farm', 'cottage', 'cat', 'turtle', 'computer', 'carrot']
for i in listEx2:
for j in ListEx:
if i in j:
print listEx.index(listEx2[i] in listEx[j])
Here is what I am attempting to do. For the items in listEx2, I want to find the index of the item in listEx, where the item in listEx2 was found in listEx. I would like the script to print out the index of the item in listEx with the name.
Thanks!