Create a function `isAlt()` that accepts a string as an argument and validates whether the vowels (a, e, i, o, u) and consonants are in alternate order.

```python
is_alt("amazon")
// true
is_alt("apple")
// false
is_alt("banana")
// true
```

Arguments consist of only lowercase letters.

Difficulty: introductory

Starter code:

def is_alt(s):
	

Solutions:
import re

def is_alt(s):
    return not re.search('[aeiou]{2}|[^aeiou]{2}',s)

def is_alt(s):
    vowels = list("aeiou")
    v = s[0] in vowels
    
    for i in s:
        if (i in vowels) != v:
            return False
        v = not(v)
    return True

def is_alt(s):
    a = s[::2]
    b = s[1::2]
    if (b[0] in 'aeiou'):
        c = a
        a = b
        b = c  
    return all(x in 'aeiou' for x in a) and all(x not in 'aeiou' for x in b);

vowels = "aeiou"
def is_alt(s):
    # if string is less than 2 characters, it cannot alternate
    if len(s) < 2:
        return False

    # check if the first character is a vowel or consonant
    prevIsVowel = s[0] in vowels
    for c in s[1::]:
        # check if the next character is a vowel or consonant
        isVowel =  c in vowels
        
        # if the previous character and this character are both vowels
        # or both consanants, return False
        if prevIsVowel == isVowel:
            return False
        
        # set the previous char state to the current character state
        prevIsVowel = isVowel
        
    return True

import re
def is_alt(s):
    return False if re.findall('[aeiou0]{2,}|[^aeiou0-9\W]{2,}',s) else True 

def is_alt(s):
    return helper(s, 0, 1) if s[0] in "aeiou" else helper(s, 1, 0)
def helper(s, n, m):
    for i in range(n, len(s), 2):
        if s[i] not in "aeiou":
            return False
    for i in range(m, len(s), 2):
        if s[i] in "aeiou":
            return False
    return True

from itertools import groupby

def is_alt(s):
  return all(len(list(gp)) == 1 for _, gp in groupby(s, key = lambda x: x in 'aeiou'))

def is_alt(s):
    vowels = "aeiou"
    prev = s[0]
    for ch in s[1:]:
        if (prev in vowels and ch in vowels) or (prev not in vowels and ch not in vowels):
            return False
        prev = ch
    return True

import re 
def is_alt(s):
    return bool(re.search(r'^([aeiou][^aeiou])*[aeiou]?$|^([^aeiou][aeiou])*[^aeiou]?$',s))

from itertools import tee

def is_alt(s):
    xs1, xs2 = tee(map(lambda x: x in 'aeiou', s))
    next(xs2)
    return all(a != b for a, b in zip(xs1, xs2))