Take a look at the piece of code below that contains a template, a string read from the input, and a match() function. Complete the code in the following fashion: if the match is found, print "Match". If the template doesn't match the string, print "No match".
Match object and flags
Filter the results
Report a typo
Write a program in Python 3
import re
# put your regex in the variable template
template = r"Scaramouch."
string = input()
match = re.match(template, string)
___
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.