title: Understanding for loops in Python
body: <p>I'm trying to create a <code>for</code> loop and I ran into problems. I don't understand how these loops work, and I think the problem is because I'm using the <code>for</code> syntax incorrectly.</p>
  <p>From what I understand, a <code>for</code> loop should look like</p>
  <pre><code>for w in words:
      print(w, len(w))
  </code></pre>
  <p>But <em>how exactly does it work</em>?</p>
  <p>To try to be specific: What does the <code>w</code> mean? How can I know what to write between <code>for</code> and <code>in</code>, and after <code>in</code>? What exactly happens when the code runs?</p>