Fill in the blanks to create a pattern that matches strings that contain 3 characters, out of which the last character is an exc
30 Answers
New Answercan you help me
6/9/2017 8:53:10 AM
R.kishore30 Answers
New AnswerYou need to match two "any character", followed by an exclamation mark. In regular expressions, "any character" is matched by using a dot. And the exclamation mark is a regular character, so you match it using... an exclamation mark :) So you are looking for: ..!
ill in the blanks to create a pattern that matches strings that contain 3 characters, out of which the last character is an exclamation mark. answer is r"..!$"
Fill in the blanks to match strings that are not entirely composed of digits. import re pattern = r"[ ^ 0-9 ] " m = re.search(pattern, "Hi there!")
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message