import re def strip_tags(rawtext): text = re.sub("

", "\n\t", rawtext) text = re.sub("<.+?>", "", rawtext) return text