Home /
Expert Answers /
Computer Science /
python-nbsp-cv-match-sentence-pattern-returns-a-list-of-the-words-in-sentence-whose-pattern-of-pa912
(Solved): Python
cv_match(sentence, pattern) returns a list of the words in sentence whose pattern of ...
Python
cv_match(sentence, pattern) returns a list of the words in sentence whose pattern of consonants and vowels matches pattern, a string of ' \( c \) 's and ' \( v \) 's. Examples: \( \gg> \) cv_match("Tim has a pet rat named Nip", "cvc") ['Tim', 'has', 'pet', 'rat', 'Nip'] \( \gg> \) cV_match("Put the loot in your boot", "cvvc") ['loot', 'your', 'boot'] \( \gg>> \) cv_match("This will have no matches", "vvv") [ ] Matches are on the basis of a whole word and are case-insensitive. Assume the pattern has at least one character.