how to remove <BR> using replace function?

Rinzwind w.damen at gmail.com
Thu Feb 9 03:06:05 EST 2006


Works for me.

>>> txt = "an unfortunate <br> in the middle"
>>> print txt.replace("<br>", "")
an unfortunate  in the middle
>>> 


Though I don't like the 2 spaces it gives ;)




More information about the Python-list mailing list