2

The task is to convert Де to Де. Does Python 3 has builtin function or I need to parse this string and then use builtin chr method to convert each number to string?

Artem Rys
  • 124
  • 9

2 Answers2

2

You can use the html.unescape function:

import html

text = 'Де'
result = html.unescape(text)
Willem Van Onsem
  • 397,926
  • 29
  • 362
  • 485
2

In python 3.4 and above, you can use html.unescape:

>>> import html
>>> print(html.unescape('Де'));
Де
Mureinik
  • 277,661
  • 50
  • 283
  • 320