My question is slightly related to: Strip HTML from strings in Python
I am looking for a simple way to strip HTML code from text. For example:
string = 'foo <SOME_VALID_HTML_TAG> something </SOME_VALID_HTML_TAG> bar'
stripIt(string)
Would then yield foo bar
.
Is there any simple tool to achieve this in Python? The HTML code could be nested.