text with unicode escape sequences to unicode in python
Question:
suppose I have the string
test
'\u0259'
Note the escaped backslash.
How do I convert it to the respective unicode string?
Answers:
>>> print('test \u0259'.decode('unicode-escape'))
test ə
suppose I have the string
test
'\u0259'
Note the escaped backslash.
How do I convert it to the respective unicode string?
>>> print('test \u0259'.decode('unicode-escape'))
test ə