Printing the matched string

Report a typo

Your task is to write a program that will explicitly print the greeting if it is at the beginning of the string, and prints "No greeting!" otherwise. The possible greetings are: "Good morning", "Good afternoon" and "Good evening".

Sample Input 1:

Good morning

Sample Output 1:

Good morning
Write a program in Python 3
import re

string = input()
# your code here
___

Create a free account to access the full topic