25 Aug
2003
25 Aug
'03
9:02 p.m.
Florian Reiser wrote at 2003-8-25 11:24 +0200:
I have an unicode string:
text = u'ABC<EURO>'
Now I want to do a replacement of the string u'<EURO>' to u'\u20ac' (this is the euro sign). When I type
text = text.replace(u'<EURO>', u'\u20ac')
nothing happens, the string is still u'ABC<EURO>' How can I replace the tag '<EURO>' and insert the euro sign instead?
Works for me: Python 2.1.3. Done in an interactive interpreter. Dieter