def is_Chinese(word): for ch in word: if ‘u4e00’ <= ch <= ‘u9fff’: return True return False
print(is_Chinese(“中文”))
上一篇 Python 正则表达式 - Regular expression
下一篇 【LeetCode - Java】22. 括号生成(中等)
版权所有 (c)2021-2022 MSHXW.COM
ICP备案号:晋ICP备2021003244-6号