title: For loop: Syntax Error: mismatched input '' expecting EOF
body: <p>I'm using jython 2.5.1 and netbeans,</p>
  
  <p>I have the following code:</p>
  
  <pre><code>import csv
  import pprint
  import os
  
  column=[]
  mycsv = csv.reader(open('F:\lia1.csv'))
  for row in mycsv:
      text = row[0].strip()
  
  if text.isdigit():
      column.append(text[-4:])
  
  
  out=' '.join(column)
  
  f2=open('F:\somefile.txt','w')
  f1=open("F:\xml1.txt","r") 
  
  for item in out:
      try:
          text = f1.readline()
          text = text.replace("Keys1028","Keys"+str(item))
          f2.write(text)
  </code></pre>
  
  <p>I have the following error:</p>
  
  <pre><code> for item in out:
      ^
  SyntaxError: mismatched input '' expecting EOF
  </code></pre>
  
  <p>if I comment out try: I get:</p>
  
  <pre><code>  for item in out:
      ^
  SyntaxError: mismatched input '' expecting EOF
  </code></pre>
  
  <p>How can I fix this?</p>