title: how do i delete a line that contains a certain string?
body: <p>What I am trying to do here is :
  1.read lines from a text file.
  2.find lines that contain certain string.
  3.delete that line and write the result in a new text file.</p>
  
  <p>For instance, if I have a text like this:</p>
  
  <pre><code>Starting text
  How are you?
  Nice to meet you
  That meat is rare
  Shake your body
  </code></pre>
  
  <p>And if my certain string is 'are'
  I want the output as:</p>
  
  <pre><code>Starting text
  Nice to meet you
  Shake your body
  </code></pre>
  
  <p>I don't want something like:</p>
  
  <pre><code>Starting text
  
  Nice to meet you
  
  Shake your body
  </code></pre>
  
  <p>I was trying something like this:</p>
  
  <pre><code>opentxt = open.('original.txt','w')
  readtxt = opentxt.read()
  
  result = readtxt.line.replace('are', '')
  
  newtxt = open.('revised.txt','w')
  newtxt.write(result)
  newtxt.close()
  </code></pre>
  
  <p>But it don't seem to work...</p>
  
  <p>Any suggestions? Any help would be great!</p>
  
  <p>Thanks in advance.</p>