title: check if any of the items of a list is in a line of a file, if not, then write the line in a new file
body: <p>I have a file that has a lot of lines and I need to create a new file, excluding the lines that contains some words.</p>
  
  <p>Have created a code which is working, but there are a lot of words, so, that would be better store these words in a list and verify the items of that list. Following the code:</p>
  
  <pre><code>infile = file('./infile_test.txt')
  newopen = open('./newfile.txt', 'w')
  
  for line in infile:
      if 'ssh' not in line and 'snmp' not in line and 'etc' not in line:
          newopen.write(line)
  </code></pre>
  
  <p>That is an example, but supposing that infile_test.txt had the lines below, a new file would be created, excluding lines 2,4 and 6 :</p>
  
  <pre><code>line 1: this is a file test
  line 2: ssh, snmp
  line 3: the idea is to iterate in each line of this file
  line 4: if the list of words (ssh,etc) does not appears in any of the line
  line 5: then write the line in another file
  line 6: etc
  line 7: itens have been removed or not ?
  </code></pre>
  
  <p>I believe that creating a list like:</p>
  
  <pre><code>list = ['ssh', 'snmp', 'etc']
  </code></pre>
  
  <p>and then iterating over that comparing each of the list itens could be better, have tried doing a new "for", used "all" and "any" function, but didn´t work well. </p>
  
  <p>Anyone knows a better way for achieving that ?</p>