title: Printing Lists in python
body: <p>I am having issues trying to print a list in python. I want to print out all of the items in a list with the following code, specifically the last two lines. </p>
  
  <pre><code>def primefind(n):
    mylist = []
    x = 3
    while (x &lt; n/2):
      if ((n % x) == 0):
        mylist.append(x)
        x = x + 2
    for item in mylist:
      print item
  </code></pre>
  
  <p>I am getting a syntax error when I run this. It highlights "item" in the last line. As far as I can tell it's syntactically correct so I am confused! Even this site shows the same syntax as I've used <a href="http://effbot.org/zone/python-list.htm#looping" rel="nofollow">http://effbot.org/zone/python-list.htm#looping</a> </p>
  
  <p>Any ideas where I've gone wrong?</p>