title: How to read user input until EOF in python?
body: <p>I came across this problem in UVa OJ. <a href="https://uva.onlinejudge.org/index.php?option=com_onlinejudge&amp;Itemid=8&amp;category=24&amp;page=show_problem&amp;problem=208" rel="noreferrer">272-Text Quotes</a></p>
  
  <p>Well, the problem is quite trivial. But the thing is I am not able to read the input. The input is provided in the form of text lines and end of input is indicated by EOF.
  In C/C++ this can be done by running a while loop: </p>
  
  <pre><code>while( scanf("%s",&amp;s)!=EOF ) { //do something } 
  </code></pre>
  
  <p>How can this be done in python .?</p>
  
  <p>I have searched the web but I did not find any satisfactory answer. </p>
  
  <p>Note that the input must be read from the console and not from a file.</p>