title: Trying to understand phrases like 'for x in car'
body: <p>I've got some code here and I'm trying to review it to practice. The aim of the code is to read in a colour of a car and count up how many times that colour has been mentioned.</p>
  
  <p>The code is below and it does work:</p>
  
  <pre><code>car = {}
  color = input("Car: ")
  
  while color:
    if color not in car:
      car[color] = 1
    else:
      car[color] = car[color] + 1
    color = input("Car: ")
  for x in car:
    print("Cars that are", x, ":", car[x])
  </code></pre>
  
  <p>But I'm not sure what the following means or does:</p>
  
  <pre><code>for x in car:
        print("Cars that are", x, ":", car[x])
  </code></pre>
  
  <p>I'm not sure about what phrases like <code>for i in range:</code> or <code>for x in cars:</code> mean.</p>
  
  <p>I am new to programming. It would be appreciated is I could get an explanation about what they actually do in Python and what they mean as x wasn't assigned as a variable in the code.</p>
  
  <p>Thanks.</p>