title: How do I display the index of a list element in Python?
body: <p>I've got the following code:</p>
  <pre><code>hey = [&quot;lol&quot;, &quot;hey&quot;, &quot;water&quot;, &quot;pepsi&quot;, &quot;jam&quot;]
  
  for item in hey:
      print(item)
  </code></pre>
  <p>Do I display the position in the list before the item, like the following?</p>
  <pre class="lang-none prettyprint-override"><code>1 lol
  2 hey
  3 water
  4 pepsi
  5 jam
  </code></pre>
  <p><sub>This is for a homework assignment.</sub></p>