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".
Match object and flags
Printing the matched string
Report a typo
Sample Input 1:
Good morningSample Output 1:
Good morningWrite a program in Python 3
import re
string = input()
# your code here
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.