Skip to content

Instantly share code, notes, and snippets.

@llSourcell
Created January 26, 2020 18:16
Show Gist options
  • Select an option

  • Save llSourcell/d59fa42ebed53ed4368705d3e93c63a6 to your computer and use it in GitHub Desktop.

Select an option

Save llSourcell/d59fa42ebed53ed4368705d3e93c63a6 to your computer and use it in GitHub Desktop.
greeting_inputs = ("hey", "good morning", "good evening", "morning", "evening", "hi", "whatsup")
greeting_responses = ["hey", "hey hows you?", "*nods*", "hello, how you doing", "hello", "Welcome, I am good and you"]
def generate_greeting_response(greeting):
for token in greeting.split():
if token.lower() in greeting_inputs:
return random.choice(greeting_responses)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment