title: Why can I use a list index as an indexing variable in a for loop?
body: <p>I have the following code:</p>
  
  <pre><code>a = [0,1,2,3]
  
  for a[-1] in a:
    print(a[-1])
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>0
  1
  2
  2
  </code></pre>
  
  <p>I'm confused about why a list index can be used as an indexing variable in a for loop.</p>