listEx = [\'cat *(select: \"Brown\")*\', \'dog\', \'turtle\', \'apple\']
listEx2 = [\'hampter\',\' bird\', \'monkey\', \'banana\', \'cat\']
for j in listEx2:
fo
Just use enumerate
:
listEx = ['cat *(select: "Brown")*', 'dog', 'turtle', 'apple']
listEx2 = ['hampter',' bird', 'monkey', 'banana', 'cat']
for j in listEx2:
for pos, i in enumerate(listEx):
if j in i:
print j, "found in", i, "at position", pos, "of listEx"
This will print
cat found in cat *(select: "Brown")* at position 0 of listEx