Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Remove Accents by Degusto
import unicodedata
def checkio(in_string):
return replace_accents(in_string)
def replace_accents(s):
return ''.join(char for char in unicodedata.normalize('NFD', s) if unicodedata.category(char) != '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')
Nov. 30, 2015