刘功瑞的博客

有一天你突然惊醒,发现这一切,都只不过是一场梦。

python 输出指定段unicode编码对应的信息(人眼看到)

ython 输出指定段unicode编码对应的信息(人眼看到)

比如查看unicode编码中005b-005f这一段的信息:

python3代码

for i in range(0x005b,0x005f):
    print (chr(i))
    
[
\
]
^

python2代码

for i in range(0x005b,0x005f):
    print (unichr(i))
    
[
\
]
^



发表评论:

Powered By Z-BlogPHP 1.5.2 Zero

Copyright www.liugongrui.com.All Rights Reserved.