2017-10-07 41 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

如果它有效,请考虑接受答案 –

相关问题