python中判断字符串是否为中文

 for c in s:
        if not ('\u4e00' <= c <= '\u9fa5'):
            return False
    return True

猜你喜欢

转载自www.cnblogs.com/zxmbky/p/9160700.html
今日推荐