fresh for me

1.chr()       ascii码-->数值
与此相对
ord()     数值-->ascii码
print(chr(112))
---p
print(ord('p'))
---112
2.import unicodedata
unicodedata.categary(str)
返回str在UNICODE里的分类类型
[Cc] Other, Control
[Cf] Other, Format
[Cn] Other, Not Assigned (no characters in the file have this property)
[Co] Other, Private Use
[Cs] Other, Surrogate
[LC] Letter, Cased
[Ll] Letter, Lowercase
[Lm] Letter, Modifier
[Lo] Letter, Other
[Lt] Letter, Titlecase
[Lu] Letter, Uppercase
[Mc] Mark,

fresh for me最先出现在Python成神之路

版权声明:
作者:dingding
链接:https://www.techfm.club/p/11399.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>