Same name? Same name!

Report a typo

How would you write a regexp pattern that matches a person whose last name is Smith?

Note that your pattern must match such names as:

  • Will Smith
  • Bessie Smith
  • Anna Nicole Smith

And should not match:

  • will Smith (lowercase first name)
  • Bessie smith (lowercase last name)
  • Anna NicoleSmith (no space between the names)
  • Smith (no first name)

You do not need to read input or print anything, your task is to put your regexp in the template variable. We'll do the rest for you!

Sample Input 1:

Will Smith

Sample Output 1:

True
Write a program in Python 3
import re


# put your regex in the variable template
template = ""
___

Create a free account to access the full topic