Last active
May 11, 2016 13:04
-
-
Save cbenz/478aed18a5e8eb669e9df5d5bcd7387d to your computer and use it in GitHub Desktop.
Add cedillas to each char of a string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unicodedata | |
def add_cedillas(text, cedilla = '̧'): | |
return unicodedata.normalize('NFC', ''.join(map(lambda char: char + cedilla, text))) | |
add_cedillas('tsss') | |
# => 'ţşşş' | |
add_cedillas('facile') | |
# => 'f̧a̧çi̧ļȩ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
W̧O̧W̧ i̧m̧p̧ŗȩşşi̧v̧ȩ!̧