How can I replace a character in a string with a non ascii character in python?
I want to replace the number sign (#) with a character like a sign called the musical sharpness sign (β―). I tried the following line but didn't work.
res['n'].replace('#', 'β―')
I also tried them and also didn't work fine.
res['n'].replace('#', u'β―')
res['n'].replace('#', '\xe2')
Anyone got an idea of ββthe situation?
+3
source to share