Q:

Remove 'spaces' between html tags in text from Excel

In MsExcel/LibreOfficeCalc I have text like this:
<h3><strong>Ways to stretch your budget</strong>

<p>passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?
</p>

<p>passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?</p>

<ul>
    <li><strong>Instrument Rentals</strong> &nbsp;passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?</li>
    <li><strong>passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?</li>

</ul>

How do I remove the text between html tags ? 
Example:
<p>content<p><ul><li>content></li></ul>

A:

Just use regular expressions:
import re

result = re.sub('>\s*<', '><', text, 0, re.M)

