title: Deleting a line from text file in python
body: <p>I want to delete a specific line in a text file in python. for example, say in my text file I have:</p>
  
  <pre><code>Ben Walsh - 768
  
  James Cook - 659
  
  Jamie Walsh - 4359
  
  Owen Perkins - 699
  
  Dylan Thomas - 1574
  
  Adam Ward - 987
  
  Allen Woodhouse - 599
  </code></pre>
  
  <p>I want to delete any line that contains the number <code>699</code>.
  How do I do this?</p>
  
  <p>I have tried using this to solve it,<a href="https://stackoverflow.com/questions/4710067/deleting-a-specific-line-in-a-file-python">Deleting a specific line in a file (python)</a>
  however, using Tkinter I am asking the user to enter the number of the person they want to delete. So the number decides what is deleted because there are other items on the line it does not delete it.</p>