Python - Check if two words are in a string
<p>I would like to check whether 2 words "car" and "motorbike" are in each element of an array in Python. I know how to check for one word with <code>in</code> but have no idea how to do with 2 words. Really appreciate any help</p>

<p>Use an auxiliar boolean.</p>

<pre><code>car=False
 motorbike=False
 for elem in array:

        if "car" in elem:
            car=True
        if "motorbike" in elem:
            motorbike=True
        if car and motorbike:
            break
</code></pre>

<p>EDIT: I just read "in each element". Just use AND.</p>

python