Write a regular expression that ensures the word "end" is inside of another word (e.g. "bending"). You must use RegEx boundary assertions. Non-word characters such as !, ?, etc. cannot be boundaries.
pattern = "yourregularexpressionhere"
bool(re.search(pattern, "The end of the story.")) β False
bool(re.search(pattern, "Endings are pointless.")) β False
bool(re.search(pattern, "Let"s send!")) β False
bool(re.search(pattern, "We viewed the rendering at the end.")) β True
bool(re.search(pattern, "Sometimes bending the rules is good.")) β True
\w, *, . or + in your expression.import re from the code.