You can do this with the HTMLParser module (complicated) or use regular expressions:
import re
content = "asdf end"
x=re.search("", content, re.DOTALL)
span = x.span() # gives (5, 27)
stripped_content = content[:span[0]] + content[span[1]:]
EDIT: re.DOTALL, thanks to tgray