title: How to remove content in nested tags with BeautifulSoup?
body: <p>How to remove content in nested tags with <code>BeautifulSoup</code>? These posts showed the reverse to retrieve the content in nested tags: <a href="https://stackoverflow.com/questions/20982406/how-to-get-contents-of-nested-tag-using-beautifulsoup">How to get contents of nested tag using BeautifulSoup</a>, and <a href="https://stackoverflow.com/questions/4362981/beautifulsoup-how-do-i-extract-all-the-lis-from-a-list-of-uls-that-contains">BeautifulSoup: How do I extract all the &lt;li&gt;s from a list of &lt;ul&gt;s that contains some nested &lt;ul&gt;s?</a></p>
  
  <p>I have tried <code>.text</code> but it only removes the tags</p>
  
  <pre><code>&gt;&gt;&gt; from bs4 import BeautifulSoup as bs
  &gt;&gt;&gt; html = "&lt;foo&gt;Something something &lt;bar&gt; blah blah&lt;/bar&gt; something&lt;/foo&gt;"
  &gt;&gt;&gt; bs(html).find_all('foo')[0]
  &lt;foo&gt;Something something &lt;bar&gt; blah blah&lt;/bar&gt; something else&lt;/foo&gt;
  &gt;&gt;&gt; bs(html).find_all('foo')[0].text
  u'Something something  blah blah something else'
  </code></pre>
  
  <p>Desired output:</p>
  
  <blockquote>
    <p>Something something  something else</p>
  </blockquote>