title: python syntax error while trying to read a text file
body: <p>I'm working on a python program that reads a text file, splits the file by semicolon, and then removes tabs and newlines. This is the code I have so far</p>
  
  <pre><code>myfile="F:\\Python\\Programs\\test.sas"
  f=open(myfile,"r")
  g=f.read()
  statements=g.split(';')
  statements.pop()
  statements2=list()
  for cue in statements:
      statements2.append(cue.strip("\n")
  print(statements)
  </code></pre>
  
  <p>The text file it reads looks like this</p>
  
  <pre><code>data test1;
      set test;
  run;
  
  data test2;
      set test;
  run;
  
  data test3;
      set test2;
  run;
  
  data test4;
      set test3;
  run;
  </code></pre>
  
  <p>I'm just starting to learn python so I'm not really sure where the problem is. The error I'm getting has an arrow pointing at the t in print, and says "SyntaxError: invalid syntax"</p>
  
  <p>I'm using python 3.4.3. Any help is greatly appreciated.</p>