Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Striped Words by wbl4126
import re
VOWELS = "AEIOUY"
CONSONANTS = "BCDFGHJKLMNPQRSTVWXZ"
def checkio(text):
pattern = rf"[{VOWELS}]?([{CONSONANTS}][{VOWELS}])*[{CONSONANTS}]?"
check = lambda s: len(s) > 1 and re.fullmatch(pattern, s, re.IGNORECASE) != None
return len([*filter(check, re.split(r"[\W]", text))])
March 24, 2020
Comments: