Advertisement
here2share

# remove_accents.py

Nov 1st, 2016
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. # remove_accents.py
  2.  
  3. import unicodedata
  4.  
  5. def removeAccentedChars(s):
  6.     return unicodedata.normalize('NFKD',s).encode('ascii','ignore')
  7.  
  8. print removeAccentedChars(u"aaàöÜ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement