Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import unicodedata
- import sys
- python = 'pýtĥöñ\fis\tawesome\r\n'
- print(python)
- mapa_caracteres = {
- ord('\t'): ' ',
- ord('\f'): ' ',
- ord('\r'): None
- }
- python = python.translate(mapa_caracteres)
- print(python)
- caracteres_combinados = dict.fromkeys(c for c in range(sys.maxunicode)
- if unicodedata.combining(chr(c)))
- python = unicodedata.normalize('NFD', python)
- print(python)
- print(python.translate(caracteres_combinados))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement