title: Remove all lines in a data set >= a value
body: <p>I have an extensive data set of over 400,000 lines. Here is an example of the dataset:</p>
  
  <pre><code>40005 1583274133
  40000 1583274134
  40004 1583274135
  40004 1583274136
  160 1583274137
  40005 1583274137
  40006 1583274138
  40003 1583274139
  40001 1583274140
  40003 1583274141
  40003 1583274142
  </code></pre>
  
  <p>I need to remove any line's that start with a number greater than or equal to 40000. It is particle physics data for muon decay rates, so anything over 40000 nanoseconds is basically useless. I know how to open and write files, I am just not sure what the most efficient way to get rid of all of the lines with 40000 or greater as the first column is. File is a text file separated by tabs.</p>