我有一份足球运动员的名字列表,但无法正确打印带有重音字符的名字。我查看了许多 StackOverflow 帖子,但似乎找不到有效的解决方案。
现在,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
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句