Is there a way to input a multiple word string to search multiple matching dictionary keys? - Thank you.
def concept(word):
# use this to list python file titles and links to open them in a new tab
files = {1:"http://file_title0001.py",
2:"file_title0002.txt",
3:"file_title0003.txt",
4:"file_title0004.txt",
5:"file_title0005.txt",
6:"file_title0006.txt",
7:"file_title0007.txt",
8:"file_title0008.txt",
9:"file_title0009.txt"}
# change keys to searchable simple keyword phrases.
concepts = {'GAMES':[1,2,4,3,3],
'BLACKJACK':[5,3,5,3,5],
'MACHINE':[4,9,9,9,4],
'DATABASE':[5,3,3,3,5],
'LEARNING':[4,9,4,9,4]}
if word.upper() not in concepts:
print("Nothing Found in Database")
return
for pattern in concepts[word.upper()]:
print(files[pattern])
while True:
concept(input("Enter Concept Idea: "))
print("\n")