开发者

Python. The coding of a string

>>> w开发者_开发知识库ord = '\u041a\u041e\u041b'
>>> print u'\u041a\u041e\u041b' 
КОЛ
>>> print word 
\u041a\u041e\u041b

How to transform string as a variable to a readable kind (how print word)?


>>> print '\u041a\u041e\u041b'.decode('unicode-escape')
КОЛ
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜