Created
January 26, 2020 18:16
-
-
Save llSourcell/d59fa42ebed53ed4368705d3e93c63a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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