+ 1

[Solved] How to search for a list from input

I've been able to make a large collection of lists within lists (recipes for Subnautica) in the post below. What I can't figure out is how to search for any given recipe from input. Please help. I'm open to suggestions. https://code.sololearn.com/cHt1uEEL5B80/?ref=app

2nd Oct 2020, 5:29 PM
Kelly H. Milligan
Kelly H. Milligan - avatar
2 Answers
+ 2
I LOVE this! Sadly itd be easier implemented through a dictionary. for example: recipies = { 'titanium': "1 metal salvage", 'titanum_ingot': "10 titanum", ... ...} # Then you can just search by: print(recipies['titanium']) # output 1 metal salvage
2nd Oct 2020, 5:34 PM
Slick
Slick - avatar
+ 1
Slick, thanks so much! I was wondering how I might apply that when I learned about it.
2nd Oct 2020, 5:39 PM
Kelly H. Milligan
Kelly H. Milligan - avatar