title: Delete line from text file if line contains one of few specified strings Python
body: <p>I presently have code that deletes all lines from a text file that contain one specific string. Here it is:   </p>
  
  <pre><code>import os  
  with open(r"oldfile") as f, open(r"workfile", "w") as working:    
      for line in f:   
         if "string1" not in line:  
             working.write(line)  
  os.remove(r"oldfile")  
  os.rename(r"workfile", r"oldfile")    
  </code></pre>
  
  <p>My question is: how can I include other strings? In other words, I want to tell the script that if a line contains "string1" <strong>or</strong> some other string "string2", then delete that line. I know I could just repeat the code I put above for every such string, but I'm certain there's some shorter and more efficient way to write that.<br>
  Many thanks in advance!</p>