Removing specific strings
<p>I have the following block of code. Can I have a line that removes specific strings before writing?</p>

<pre><code>while str(line).find("ii") &lt; 0:
    if str(line)[0].isdigit():
        if str(line).find("No Action Taken") &lt; 0 and str(line).find("Existing IV Retest") &lt; 0:
            #&lt;----LINE HERE TO REMOVE ANYTHING I SPECIFY------&gt; example anything in brackets [),(,&amp;,&amp;,#,@]
            f.write(str(line).strip())
            f.write(',')
</code></pre>
