Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Surgical strike solution in Clear category for Remove Accents by carel.anthonissen
from unicodedata import normalize
import re
def checkio(in_string):
# Regex pattern that matches accents
pat = '\\\\u03[0-6].'
# Normalise Unicode representation and covert to escape characters
coded = normalize('NFD', in_string).encode('unicode-escape').decode('utf-8')
# Get rid of those accents
no_accent_coded = re.sub(pat,'',coded)
# And covert back to unicode
return no_accent_coded.encode().decode('unicode-escape')
May 7, 2020
Comments: