title: Delete file if it contains a string
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4940032/search-for-string-in-txt-file-python">Search for string in txt file Python</a>  </p>
  </blockquote>
  
  
  
  <p>How, in python, can I delete a file if it contains a string.
  I want it to go though all files in a directory, open them, check if they contain a string, if yes, deletes the file and moves onto the next one.</p>