title: How to pass lines from file to input()?
body: <p>If I have a simple program that I would like to test:</p>
  
  <pre><code>for _ in range(int(input())):
      a = int(input())
      print(a+2)
  </code></pre>
  
  <p>With an input file</p>
  
  <pre><code>3
  1
  9
  4
  </code></pre>
  
  <p>How can I launch python and point out to read lines from the input file without modifying the solution program?</p>