13
votes

Possible Duplicate:
Conversion of strings like \\uXXXX in python

Hi, suppose I have the string

test
'\\u0259'

Note the escaped backslash.

How do I convert it to the respective unicode string?

1

1 Answers

33
votes
>>> print('test \\u0259'.decode('unicode-escape'))
test ə