python find index of of item in list
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/8115015/python-two-lists-finding-index-value">Python two lists finding index value</a>  </p>
</blockquote>



<pre><code>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])
</code></pre>

<p>Here is what I am attempting to do.  For the items in <code>listEx2</code>, I want to find the index of the item in <code>listEx</code>, where the item in <code>listEx2</code> was found in <code>listEx</code>. I would like the script to print out the index of the item in <code>listEx</code> with the name.</p>

<p>Thanks!</p>
