Chatting with the program?

How exactly would I going about by doing this? Let’s saying I did something like this…

helloMessages = [‘yo’, ‘hi’, ‘hello’]

and the program would print out something if the player said that? I already have a message input system, and the string the message is simply called ‘message’.

Something like:

helloMessages = ['yo', 'hi', 'hello']
if message in helloMessages:
    print "something"

:question: