Python 3, if str is present replace with str : <p>I'm writing a fairly simple python program to find and download videos from a particular site. I would like to have my script name the file by using the page title except the page title contains various strings i would like remove for e.g.,</p>

<pre><code>The title is: 
The Big Bang Theory S09E15 720p HDTV X264-DIMENSION
</code></pre>

<p>but the titles are not always consistent for e.g.,</p>

<pre><code>The title is:
Triple 9 2016 READNFO HDRip AC3-EVO
</code></pre>

<p>How can I replace strings if they are present?
Maybe create a list or dictionary of possible strings and if they are present then remove them (or replace with empty string)? I have tried and tried to find an answer but cannot find anything that helps my situation.</p>

<p>Basically if <code>"HDTV", "HDRip", "720p", "X264", etc</code> are present then replace them otherwise carry on?</p>
