Mar-05-2020, 07:03 PM
it should be
at the moment menu is a str. it's better it to be list/tuple with each item being a str, in this case you can check for exact match. At the moment if your search term is part of another, bigger str, it will still give you True
use string formmating or f-strings to construct the print output
print(menu_ask, "in menu =", menu_ask in menu)now, couple of advises:
at the moment menu is a str. it's better it to be list/tuple with each item being a str, in this case you can check for exact match. At the moment if your search term is part of another, bigger str, it will still give you True
use string formmating or f-strings to construct the print output
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs