title: What's the equivalent for while (cin >> var) in python?
body: <p>In online contests, when the length of input is not specified and reading the input file directly through the program is not possible, one can use this code in C++:</p>
  
  <pre><code>while (cin &gt;&gt; var)
  {
      //do something with var
  }
  </code></pre>
  
  <p>What's the equivalent for python?</p>
  
  <ul>
  <li>Without using any file-related function such as <code>open() write() ...</code></li>
  </ul>