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成神之路。
共有 0 条评论