title: Manipulating Many Text Files In a Directory Using Python
body: <p>I'm using python 3.6.1.
  I have a directory filled with thousands of text files.</p>
  
  <p>I want to remove the first 2 lines in each text files, without making a new copy of each text files.</p>
  
  <p>Also, I want to remove the last line in each file if they contain a certain "keyword", if not, then the last line is not removed and still there.</p>
  
  <p>How to do it?</p>
  
  <p>Thanks in advance.</p>