def is_contain_chinese(check_str):
"""
判断字符串中是否包含中文
:param check_str: {str} 需要检测的字符串
:return: {bool} 包含返回True, 不包含返回False
"""
for ch in check_str:
if u'\u4e00' <= ch <= u'\u9fff':
return True
return False
print(is_contain_chinese('aaaaaaaniu羽佳'))
判断字符串中是否包含中文
最新推荐文章于 2022-10-10 20:59:08 发布