title: Error "invalid syntax" appears when trying to redirect using input/output in Python shell
body: <p>I tried to practice input/output redirection in the Python shell. I have a file named SentinelValue.py which is where I have this code to add up the numbers in another file:</p>
  
  <pre><code>data = eval(input("Enter an integer (the input ends " + "if it is 0): "))
  
  sum = 0
  while data != 0:
      sum += data
  
      data = eval(input("Enter an integer (the input ends " + "if it is 0): "))
  
  print("The sum is", sum)
  </code></pre>
  
  <p>The other file "Numbers.txt" contains numbers:</p>
  
  <pre><code>1 
  2 
  3 
  4 
  5 
  6 
  7 
  8 
  9 
  0
  </code></pre>
  
  <p>and my output.txt file is where I want the sum to show.</p>
  
  <p>I tried using:</p>
  
  <pre><code>python SentinelValue.py &lt; Numbers.txt &gt; output.txt
  </code></pre>
  
  <p>but on shell, it highlights "SentinelValue" &amp; says "invalid syntax".
  I don't know why it's not working.</p>