Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Striped Words by dagger126
VOWELS = "AEIOUY"
CONSONANTS = "BCDFGHJKLMNPQRSTVWXZ"
import re
def checkio(text):
word1 = r'\b([%s][%s])+[%s]?\b'%(VOWELS,CONSONANTS,VOWELS)
word2 = r'\b([%s][%s])+[%s]?\b'%(CONSONANTS,VOWELS,CONSONANTS,)
p1 = re.compile(word1,re.I)
p2 = re.compile(word2,re.I)
list1 = p1.findall(text)
list2 = p2.findall(text)
return len(list1)+len(list2)
#These "asserts" using only for self-checking and not necessary for auto-testing
April 21, 2014