title: Loop through list with both content and index
body: <p>It is very common for me to loop through a python list to get both the contents <em>and</em> their indexes. What I usually do is the following:</p>
  
  <pre><code>S = [1,30,20,30,2] # My list
  for s, i in zip(S, range(len(S))):
      # Do stuff with the content s and the index i
  </code></pre>
  
  <p>I find this syntax a bit ugly, especially the part inside the <code>zip</code> function. Are there any more elegant/Pythonic ways of doing this?</p>