Accent letters to normal alphabets?

akalit (290 points)
0 1 3
asked Nov 10, 2020 in Programming in Python by akalit (290 points)
Hi!

What is the best way to convert "Accent Letters" to normal alphabets?

Thanks in advance.
134 views

1 Answer

S
Silktrader (2550 points)
1 6 16
answered Nov 10, 2020 by Silktrader (2,550 points)

You have several alternatives, such as plain dictionaries substitutions, or the string.replace method. Given the context, I'd suggest you look into the translate method of strings, here's the official documentation.

Map each accented letter to its unaccented version.

akalit (290 points)
0 1 3
commented Nov 10, 2020 by akalit (290 points)
Thanks a lot.