1. 首页
  2. 数据库
  3. 其它
  4. python根据unicode判断语言类型实例代码

python根据unicode判断语言类型实例代码

上传者: 2021-02-01 14:13:25上传 PDF文件 38.82KB 热度 9次
本文实例主要实现的是python根据unicode判断语言类型,具体如下。 实例代码: def is_chinese(uchar): 判断一个unicode是否是汉字 if uchar >= u'\u4e00' and uchar<=u'\u9fa5': return True else: return False def is_number(uchar): 判断一个unicode是否是数字 if uchar >= u'\u0030' and uchar<=u'\u0039': return True else: re
下载地址
用户评论