How to read and check stdin/stdout in python?
<p>We have <a href="http://stackoverflow.com/questions/1450393/how-do-you-read-from-stdin-in-python">this</a> good answer for how to read stdin.</p>

<ol>
<li>But I don't understand how do I run the python code so it will read from a file as <code>stdin</code>?</li>
<li>Is <code>print</code> is like <code>stdout</code>?</li>
</ol>

<p>I ask it cause I saw this order in facebook demo puzzle:</p>

<blockquote>
  <p>NOTE: You need to write the full code taking all inputs are from stdin
  and outputs to stdout  If you are using "Java", the classname is
  "Solution"</p>
</blockquote>
