Latin equivalents

Report a typo

Complete a function called normalize() that replaces specific non-ASCII characters in a given string with their ASCII equivalents.

Here are the lists of the letters and the dictionary with the replacements:

characters = ["é", "ë", "á", "å", "œ", "æ"]
replacements = ["e", "e", "a", "aa", "oe", "ae"]
map_char_to_rep = {"é": "e", "ë": "e", "á": "a", "å": "aa", "œ": "oe", "æ": "ae"}

Complete the code below so that the function normalize() takes a string with non-ASCII characters and returns a string where all of them have been replaced with the equivalents.

Note that variables characters, replacements, and map_char_to_rep are not included in the code, and should be copied manually to be used in the solution.

Sample Input 1:

Charlotte Brontë

Sample Output 1:

Charlotte Bronte
Write a program in Python 3
name = input()

def normalize(passed_name):

# put your code here

return new_name

print(normalize(name))
___

Create a free account to access the full topic