原文链接:https://www.jb51.net/article/153637.htm
# 检验是否含有中文字符
def isContainChinese(s):
for c in s:
if (‘\u4e00‘ <= c <= ‘\u9fa5‘):
return True
return False
# 检验是否全是中文字符
def isAllChinese(s):
for c in s:
if not (‘\u4e00‘ <= c <= ‘\u9fa5‘):
return False
return True
原文:https://www.cnblogs.com/wtmb/p/13543992.html