mirror of
https://github.com/hastagAB/Awesome-Python-Scripts.git
synced 2024-11-24 04:21:08 +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"))
|