Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Striped Words by birds_vs_worms
VOWELS = "AEIOUY"
def checkio(text):
import re
text = text.upper()
words = re.split('\W+', text)
words = [w for w in words if len(w) > 1 and w.isalpha() and is_striped(w)]
return len(words)
def is_striped(word):
for i in range(len(word) - 1):
if (word[i] in VOWELS) == (word[i+1] in VOWELS):
return False
return True
March 27, 2016