title: Delete a line from a file after reading python
body: <p>how to delete/remove a line from a .txt file after reading or printing</p>
  
  <pre><code>for x in open("words.txt",'r'):
  print x
  # Here i want to delete the line after printing and continue the loop
  </code></pre>
  
  <p>Can someone help me ?</p>