Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Concise algorithm solution in Speedy category for Remove Accents by Igor_Sekretarev
from unicodedata import category, normalize
def checkio(in_string: str) -> str:
return ''.join(ch for ch in normalize('NFKD', in_string)
if category(ch) != 'Mn')
#These "asserts" using only for self-checking and not necessary for auto-testing
if __name__ == '__main__':
assert checkio(u"préfèrent") == u"preferent"
assert checkio(u"loài trăn lớn") == u"loai tran lon"
print('Done')
April 25, 2021