Searching for two or more words in string - Python Troubleshooting Program
<p>I know the code for searching words in a string that match to another string.</p>

<pre><code>if any(word in problem for word in keyword_virus):
    #Some code her e.g. pc_virus()
</code></pre>

<p>But is there any code that would allow me to check if two or more words matched/or even any modifications to this code?</p>

<p>Thank you :)</p>

<pre><code>keyword_virus = 'the brown fox jumps'
print([x for x in ['brown', 'jumps', 'notinstring'] if x in keyword_virus.split()])
#['brown', 'jumps']
</code></pre>

<p>That will return all matched words in keyword_virus.</p>

python variables if-statement search