Awesome-Python-Scripts/Word-generator/isEng.py

13 lines
262 B
Python
Raw Normal View History

2018-10-03 15:21:46 +00:00
def getDict(file):
words = set()
with open(file) as d:
for w in d.read().split("\n"):
words.add(w.lower())
return words
def isEng(word):
englishWords = getDict("dictionary.txt")
if word in englishWords:
return True
return False
print(isEng("boot"))