title: Ignore one div class in BeautifulSoup find_all in Python 3
body: <p>I want to ignore one class when using find_all. I've followed this solution <a href="https://stackoverflow.com/questions/58310935/select-all-divs-except-ones-with-certain-classes-in-beautifulsoup">Select all divs except ones with certain classes in BeautifulSoup</a></p>
  <p>My divs are a bit different, I want to ignore description-0</p>
  <pre><code>&lt;div class=&quot;abc&quot;&gt;...&lt;/div&gt;
  &lt;div class=&quot;parent&quot;&gt;
      &lt;div class=&quot;description-0&quot;&gt;&lt;/div&gt;
      &lt;div class=&quot;description-1&quot;&gt;&lt;/div&gt;
      &lt;div class=&quot;description-2&quot;&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;xyz&quot;&gt;...&lt;/div&gt;
  </code></pre>
  <p>Following is my code</p>
  <pre><code>classToIgnore = [&quot;description-0&quot;]
  all = soup.find_all('div', class_=lambda x: x not in classToIgnore)
  </code></pre>
  <p>It is reading all divs on the page, instead of just the ones with &quot;descriptions-n&quot;. How to fix it?</p>