>>> word = '\u041a\u041e\u041b'
>>> print u'\u041a\u041e\u041b'
???
>>> print word
\u041a\u041e\u041b
Run Code Online (Sandbox Code Playgroud)
如何将字符串作为变量转换为可读类(如何打印字)?
>>> print '\u041a\u041e\u041b'.decode('unicode-escape')
???
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
109 次 |
| 最近记录: |