title: Unix EOF character appearing in output of Python script
body: <p>I have a few python files that take input as two ints separated by spaces, and return an int. (My class requires this.) I'm having an issue where an extra "D" appears along with my output, after I hit <code>Ctrl-D</code> to end the input. It's running the programs correctly, though - the output is correct.</p>
  
  <p>Here's what I'm seeing:</p>
  
  <pre><code>$ python gcd_euclid.py 
  144 100
  4D
  $ python pc_1_ucsd.py
  3 4
  7D
  </code></pre>
  
  <p>Oddly...this wasn't happening yesterday, and I'm not sure if I changed anything. Does anyone have any ideas why this is happening and how to fix it?</p>
  
  <p><strong>Edit:</strong> Here is the snippet that the course provided for reading the input. I hadn't used <code>sys.stdin</code> before this week.</p>
  
  <pre><code>import sys
  
  input = sys.stdin.read()
  tokens = input.split()
  a = int(tokens[0])
  b = int(tokens[1])
  
  print(a + b)
  </code></pre>
  
  <p>(they chose to use the input keyword as a variable, not me!)</p>