title: What's the difference between "word = line.split()" and "for word in line.split()"?
body: <p>I'm new to programming and this is my first question here. I feel it might be a very silly beginner doubt, but here goes.</p>
  <p>On multiple occasions, I've typed out the whole code right except for this one line, on which I make the same mistake every time.</p>
  <p>Could someone please explain to me what the computer understands when I type each of the following lines, and what the difference is?</p>
  <pre><code>word = line.split()
  for word in line.split()
  </code></pre>
  <p>The difference between the expected and my actual output is just because I typed the former instead of the latter:</p>
  <p><a href="https://i.stack.imgur.com/0u7TZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0u7TZ.png" alt="enter image description here" /></a></p>