Awesome-Python-Scripts/Word-generator/isEng.py
2018-10-03 12:21:46 -03:00

13 lines
262 B
Python

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"))