2024-04-29 02:30:33 发布
网友
我有一个足球运动员的名单,但不能得到与重音字符的名字打印正确。我查看了许多StackOverflow帖子,但似乎找不到有效的解决方案
现在,我被输出Alexis S\u00e1nchez困住了,而我想要Alexis Sánchez
Alexis S\u00e1nchez
Alexis Sánchez
对于Python 3.x:
>>> print(bytes('Alexis S\\u00e1nchez', 'ascii').decode('unicode-escape')) Alexis Sánchez
和Python 2.x:
>>> print("Alexis S\\u00e1nchez".decode("unicode-escape")) Alexis Sánchez
对于Python 3.x:
和Python 2.x:
相关问题 更多 >
编程相关推荐