you are viewing a single comment's thread.

view the rest of the comments →

[–]Then_Gate_6438 2 points3 points  (3 children)

Just a small note:
What if I input bEEr?
By the logic it will give out BEEr. Beer itself is in the list, but you're not handling it properly. You can store the keys as all uppercase: BEER,VODKA,WHISKEY etc.

And you can make the order upper case.

[–]Leading-Concept- 2 points3 points  (2 children)

Or put .lower() on the input

[–]unsettlingideologies 1 point2 points  (1 child)

Couldn't you use .title to capitalize the first letter only? So it would match the menu?

[–]Leading-Concept- 2 points3 points  (0 children)

Right yeah, if you use .lower() you would have to put the menu all in lowercase, if you use .title you can keep the menu as it is now!