2017-10-07 38 views

回答

0

你可以試試這個。檢查函數返回一個布爾值,您可以將其放入if語句中:

import enchant 
d = enchant.Dict("en_US") # create dictionary for US English 
if d.check("enchant"):  # or any word 
    print("It is a real word") 
else: 
    print("Its not a real word") 
+0

非常感謝你 –

+0

如果它有效,請考慮接受答案 –

相關問題