title: Fastest Way to Delete a Line from Large File in Python
body: <p>I am working with a very large (~11GB) text file on a Linux system.  I am running it through a program which is checking the file for errors.  Once an error is found, I need to either fix the line or remove the line entirely.  And then repeat...</p>
  
  <p>Eventually once I'm comfortable with the process, I'll automate it entirely.  For now however, let's assume I'm running this by hand.</p>
  
  <p>What would be the fastest (in terms of execution time) way to remove a specific line from this large file?  I thought of doing it in Python...but would be open to other examples.  The line might be <em>anywhere</em> in the file.</p>
  
  <p>If Python, assume the following interface:</p>
  
  <p><code>def removeLine(filename, lineno):</code></p>
  
  <p>Thanks,</p>
  
  <p>-aj</p>