Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
re solution in Clear category for Striped Words by UlyanaBozhko
def checkio(line: str) -> str:
import re
vow = 'eyuioa'
cons = 'qwrtpsdfghjklzxcvbnm'
line = re.sub(r'[\.,\?\'!]', ' ', line)
a = re.finditer(rf'\b([{cons}][{vow}])+[{cons}]?\b|\b([{vow}][{cons}])+[{vow}]?\b', line.lower())
return len(list(a))
June 9, 2021
Comments: