def strip_html_comments(text):
 lines = text.splitlines(True)
 new_lines = filter((lambda line: (not line.startswith('<!--'))), lines)
 return ''.join(new_lines)

def strip_html_comments ( text ) : lines = text . splitlines ( True ) new_lines = filter ( ( lambda line : ( not line . startswith ( '<!--' ) ) ) , lines ) return '' . join ( new_lines )
strip html comments from a unicode string .