how to remove <BR> using replace function?

Dylan Moreland dylan.moreland at gmail.com
Thu Feb 9 00:47:59 EST 2006


I think you want to use the replace method of the string instance.
Something like this will work:

# See http://docs.python.org/lib/string-methods.html#l2h-196
txt = "an unfortunate <br> in the middle"
txt = txt.replace("<br>", "")




More information about the Python-list mailing list