+ 6
How can I properly print accented letters in Python?
Here's a code which is supposed to print accented letters like á, é, í, ó, ú, ý. Instead, it prints different characters in Code Playground. https://code.sololearn.com/cYeXDL0t31Yf/?ref=app Why is it not printing it the way it should?
4 odpowiedzi
+ 12
Your code works in Pydroid 3.
I think it's a Unicode problem (which is currently above my pay grade 😊).
Here are a couple of links that might help.
https://docs.python.org/3.3/howto/unicode.html
https://stackoverflow.com/q/40640838
PS Congrats on COTD!
+ 6
also works in QPython 3 on Android
+ 5
Thanks David
+ 4
@Good Luck Guys,
Thanks for giving me an idea! I've been trying and looking for solutions using Unicode values, it turns out the answer is in ASCII. chr() solved it!