find position of item in for loop over a sequence
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/522563/accessing-the-index-in-python-for-loops">Accessing the index in Python for loops</a>  </p>
</blockquote>



<pre><code>list = [1,2,2,3,5,5,6,7]

for item in mylist:
    ...
</code></pre>

<p>How can I find the index of the item I am looking at, at some point in my loop? I can see there is a <code>index()</code> method for <code>lists</code> but it will always give me the first index of a value, so it won't work for lists with duplicate items</p>
