title: Strip white-space from HTML before parsing
body: <p>I have a Python dictionary containing HTML that I would later like to parse using <code>beautifulsoup</code>, but before parsing I would like to remove white-space directly adjacent to tag elements. </p>
  
  <p>For example:</p>
  
  <pre><code>string = "text &lt;tag&gt;some texts&lt;/tag&gt; &lt;tag&gt; text&lt;/tag&gt; some text"
  &gt;&gt;&gt; remove_whitespace(string)
  'text&lt;tag&gt;some texts&lt;/tag&gt;&lt;tag&gt;text&lt;/tag&gt;some text'
  </code></pre>