dictionary

This commit is contained in:
Pulguer Gonzalo 2022-02-16 10:30:51 -03:00
parent 5a37144d0b
commit 03ac6f32e1
1 changed files with 20 additions and 0 deletions

20
dictionary.py Normal file
View File

@ -0,0 +1,20 @@
from PyDictionary import PyDictionary
dictionary = PyDictionary()
filler = ["'", '{', '}', '[', ']']
d = {
'test': 'nice'
}
def means(word):
if type(d) is type(dictionary.meaning(word)):
meaning = str(dictionary.meaning(word))
for x in filler:
meaning = meaning.replace(x, '')
msg = word + ' meaning:\n' + meaning
return msg
else:
return 'made up word it doesnt exist i guess'