Convert HTML Characters To Strings

Want to learn more? I recommend these Python books: Python for Data Analysis, Python Data Science Handbook, and Introduction to Machine Learning with Python.

## Preliminaries
import html
## Create Text
text = 'This item costs ¥400 or £4.'
## Convert To String
html.unescape(text)
'This item costs ¥400 or £4.'
## Convert To HTML Entities
html.escape(text)
'This item costs ¥400 or £4.'