Python: convert unicode string to corresponding Unicode character

Viewed 90

How do I convert a unicode string '05d1' to corresponding Unicode character '\u05d1' in python?

1 Answers

Convert string to codepoint (integer) first, and then it's just chr:

>>> chr(int("05d1", 16))
'ב'
Related