So i've been attempting to program a home bar tending program that takes materials that you have in your home and compiles a list of drinks that you can possibly make. The problem I'm having is that i have no clue how to make the search function and the compiling function. As of now I have a simple list of materials that have been assigned to various numerical values ranging from 000 to 500. It looks something like this currently:
407 = 'Soy sauce'
408 = 'Sparkling white wine'
409 = 'Spiced rum'
410 = 'Sprite'
411 = 'Squirt'
412 = 'St. Hallvard'
413 = 'Stout'
414 = 'Strawberries'
415 = 'Strawberry juice'
416 = 'Strawberry liqueur'
417 = 'Strawberry schnapps'
I also have another file that contains the drink names which have been assigned to several of the numerical values in the materials file. It looks something like this:
'Ozone' = '1.5 oz' 017, 'Splash' 052, '3 oz' 424, 'Splash' 410
#which would translate to 1.5 oz of Amaretto, Splash of beer, 3 oz of Sweet and sour, Splash of Sprite
I have thought about rearranging the list so it is in a dictionary format but i'm not sure of how i'd link two corresponding dictionaries. If you guys have a better way to this I'm always open to changing my code. I am relatively new to python so anything would really help me. Thanks for your time.