Nursery rhymes

Report a typo

Imagine you have to write a poem for kids about animals. You struggle with finding appropriate rhymes for the word bunny. Write a regexp pattern that will match the right words: they should be from 4 to 7 letters long and end with -nny or -ney. Note that the pattern should only match strings containing letters—for example, the string 123nny should not be considered a good result.

Put your regexp in the template variable. You do NOT need to print any results.

Sample Input 1:

bunny

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