Filter the results

Report a typo

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".

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)
___

Create a free account to access the full topic