def clear_html_element(text, preserve=None):
 if (not preserve):
  p = re.compile('<[^>]*>')
  return p.sub('', text)
 if isinstance(preserve, basestring):
  preserve = [preserve]
 p = MyHTMLParser.parse(text, preserve)
 return p

def clear_html_element ( text , preserve = None ) : if ( not preserve ) : p = re . compile ( '<[^>]*>' ) return p . sub ( '' , text ) if isinstance ( preserve , basestring ) : preserve = [ preserve ] p = MyHTMLParser . parse ( text , preserve ) return p
clear the html element in text .