title: Getting index of the current element in Python list
body: <p>Suppose I have the following list: 
  <code>new_list = [1,2,3,7,9,5]</code><br></p>
  
  <p>I want to find a function/solution if I have to find the index of the element when I am iterating over the list and the value is 1.
  For eg- </p>
  
  <pre><code>Sum = 0
  for i in new_list:
    if i == 1:
      Sum += &lt;position of this 1&gt;  
  </code></pre>