Convering double backslash to single backslash in Python 3
I have a string like so: >>> t '\\u0048\\u0065\\u006c\\u006c\\u006f\\u0020\\u20ac\\u0020\\u00b0' That I made using a function that converts unicode to the representative Python escape sequences. Then, when I want to convert it back, I can't get rid of the double backslash so that it is interpreted as unicode again. How can this be done? >>> t = unicode_encode(" >>> t '\\u0048\\u0065\\u006c\\u006c\\u006f\\u0020\\u20ac\\u0020\\u00b0' >>> print(t) \u0048\u0065\u006c\u006c\u006f\u0020\u20ac\u0020\u00b0 >>> t.replace('\\','X') 'Xu0048Xu0065Xu006cXu006cXu006fXu0020Xu20acXu0020Xu00b0' >>> t.replace('