Jul-30-2020, 08:30 PM
Just some comments:
from random import *Python documentation:
Quote:This imports all names except those beginning with an underscore (_). In most cases Python programmers do not use this facility since it introduces an unknown set of names into the interpreter, possibly hiding some things you have already defined.
Note that in general the practice of importing * from a module or package is frowned upon, since it often causes poorly readable code. However, it is okay to use it to save typing in interactive sessions.
if user_input not in list(glossary):glossary is dictionary and there is no need to convert into list:
if user_input not in glossary:f-strings are available for many years now so instead of:
'The definition of ' + user_input + ' is ' + glossary[user_input]one can write:
f'The definition of {user_input} is {glossary[user_input]}'
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.