I'm trying to automate a series of queries but, I need to replace characters with accents with the corresponding html entity. It needs to be in Python3
Example:
vèlit
[needs to become]
vèlit
The thing is, whenever I try to do a word.replace, it doesn't find it.
This:
if u'è' in sentence:
print(u'Found è')
Works and finds "è", but doing:
word.replace('è','è')
Doesn't do anything.
Replace
word.replace('è','è')withword = word.replace('è','è')and print the result to check.word.replace('è','è')does work, but it doesn't actually make any changes to thewordcontent itself.Check str.replace()