Please ignore secret bonuses. Secret tests do NOT award bonus. Max hw grade is 30+2 bonus efficiency

Do you need help?

Notice Board

Per partecipare al corso di Fondamenti di programmazione 2023-24 loggatevi e attivatelo nella vostra pagina dei corsi preferiti. A quel punto il corso appare nel menù personale cliccando sul proprio avatar. Per i materiali degli anni precedenti seguite lo stesso metodo.

To join the Programming/Lab 2023-24 course, log-on and select it on the my courses page. It will appear on the personal menu of your avatar. For earlier years use the same method.

Accent letters to normal alphabets?

akalit (530 points)
0 1 3
in Programming in Python by (530 points)
Hi!

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

Thanks in advance.
244 views

1 Answer

S
Silktrader (2550 points)
2 6 16
by (2.6k 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 (530 points)
0 1 3
by (530 points)
Thanks a lot.