def is_Chinese(w):
if '\u4e00' <= w <= '\u9fff':
return True
def is_zh_punctuation(w):
punctuation_str = punctuation #中文符号
if w in punctuation_str:
return True
def is_en(w):
if 'a'<=w<='z' or 'A'<=w<='Z':
return True
def is_en_punctuation(w):
punctuation_string = string.punctuation
if w in string.punctuation:
return True
python判断是否为中文、中文符号、英文、英文符号
最新推荐文章于 2024-04-28 21:56:12 发布