I would like to change all accented characters into non-accented characters:
conversion_dict = {"ä": "a", "ö": "o", "ü": "u","Ä": "A", "Ö": "O", "Ü": "U",
"á": "a", "à": "a", "â": "a", "é": "e", "è": "e", "ê": "e",
"ú": "u", "ù": "u", "û": "u", "ó": "o", "ò": "o", "ô": "o",
"Á": "A", "À": "A", "Â": "A", "É": "E", "È": "E", "Ê": "E",
"Ú": "U", "Ù": "U", "Û": "U", "Ó": "O", "Ò": "O", "Ô": "O","ß": "s"}
Is there a way to do something like "paragraph of text".replace([conversion_dict])?
preferred method using third-party module
A much better alternative than the method below is to use the awesome unidecode module:
built-in, slightly-hazardous method
Inferring from your question that you are looking to normalize unicode characters, there is actually a nice, built-in way to do this:
Check out the documentation for unicodedata.normalize.
Note, however, that there might be some issues with this. See this post for a nice explanation and some workarounds.
See also, latin-1-to-ascii for alternatives.