I have multiple keys mapped to a single value. If any key matches then print the corresponding value. This is only the gist of what I want to do and not the actual code.
responses = {
("hi","Yo"):"Lets get started."
}
def get_response(user_message):
if user_message in responses:
user_message = responses[user_message]
print(user_message)
get_response("hi") #should print 'Lets get started'
get_response("Yo") #should print 'Lets get started'
Also is this the right way of storing multiple keys to a single value.