mirror of
https://github.com/hastagAB/Awesome-Python-Scripts.git
synced 2024-12-18 08:10:17 +00:00
13 lines
262 B
Python
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"))
|