python判斷字符串是不是中文

def is_Chinese(word): for ch in word: if '\u4e00' <= ch <= '\u9fff': return True return False print(is_Chinese("測試")) 運行結果如圖:html
相關文章
相關標籤/搜索