#检验是否含有中文字符
def isContainChinese(s):
num=0
for c in s:
if ('\u4e00' <= c <= '\u9fa5'):
num=num+1
return num
python判断汉字数目
最新推荐文章于 2023-07-19 17:31:38 发布
#检验是否含有中文字符
def isContainChinese(s):
num=0
for c in s:
if ('\u4e00' <= c <= '\u9fa5'):
num=num+1
return num