Beautifulsoup multiple class selector
<p>I want to select all the divs which have BOTH A and B as class attributes.</p>

<p>The following selection</p>

<pre><code>soup.findAll('div', class_=['A', 'B'])
</code></pre>

<p>however selects all the divs which have EITHER A or B in their class attributes. Classes may have many other attributes (C, D, etc) in any order, but I want to select only those ones that have both A and B.</p>