I wanted to ask this question. I've been trying to code a program that does this efficiently for ages but have a hard time getting anywhere. Essentially I have a string stored in a dictionary as such:
dic = {"a" : "Blue Jacket with buttons", "b" : "Green Jacket with a buttons",
"c" : "Blue jacket"}
Lets say i want to find "b" but the user doesn't know exactly how it is stored in the dictionary so they enter keywords they wish to use to find the item.
keywords = "Blue, Jacket, Buttons"
keywords.split(",")
How would I use the keywords to find "b" in the dictionary? I tried doing an if statement but I can't get it to notice the difference between "a" and "c". How would I use keywords to find the items in the dictionary?
Thanks!