From 03ac6f32e1b4f024667c33cc206ba63731bfc69f Mon Sep 17 00:00:00 2001 From: Pulguer Gonzalo Date: Wed, 16 Feb 2022 10:30:51 -0300 Subject: [PATCH] dictionary --- dictionary.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 dictionary.py diff --git a/dictionary.py b/dictionary.py new file mode 100644 index 0000000..00bdf37 --- /dev/null +++ b/dictionary.py @@ -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' +