55问答网
所有问题
python 判断字符串中是否含有汉字
如题所述
举报该问题
推荐答案 2016-11-22
name = u'is this 中文'
if any(u'\u4e00' <= c <= u'\u9fff' for c in name.decode('utf-8')):
print 'contain chinese'
else:
print ' not contain chinese'
温馨提示:答案为网友推荐,仅供参考
当前网址:
http://55.wendadaohang.com/zd/GR8RLFcFQGRRI8L8IG.html
其他回答
第1个回答 2016-11-22
没涉及过python,不过猜测应该是用位比较法》?
相似回答
大家正在搜
相关问题
python 判断字符串中是否含有汉字
Java 判断字符串中是否含有汉字
python 判断字符串中是否含有汉字
python 判断字符串中是否只有中文字符
python 判断字符串是否有中文
python 判断字符串是否有中文
python如何检测字典的键中是否含有某串字符?
python 中怎么判断一个字符串中含有汉子