title: Applying python script to file
body: <p>This is a simple ask but I can't find any information on how to do it: I have a python script that is designed to take in a text file of a specific format and perform functions on it--how do I pipe a test file into the python script such that it is recognized as <code>input()</code>? More specifically, the Python is derived from skeleton code I was given that looks like this:</p>
  <pre><code>def main():
      N = int(input())
      lst = [[int(i) for i in input().split()] for _ in range(N)]
      intervals = solve(N, lst)
      print_solution(intervals)
  if __name__ == '__main__':
      main()
  </code></pre>
  <p>I just need to understand how to, from the terminal, input one of my test files to this script (and see the <code>print_solution</code> output)</p>