• Bird Language. Help

 
VOWELS = ['a','e','i','o','u','y']
def translate(phrase):
    s=str()
    i=0
    while i in range(len(phrase)-1):
        if phrase[i].isalpha:
            if phrase[i] in VOWELS:
                s+=phrase[i]
                i+=3
            else:
                s+=phrase[i]
                i+=2
        else:
            s+=phrase[i]
            i+=1
    return s
RESULT
  1. translate("hieeelalaooo") == "hello" -------------------------- ##Yes!!!
  2. translate("hoooowe yyyooouuu duoooiiine") == "how youdoin" ---- ##???
  3. translate("aaa bo cy da eee fe") == "a oyaef" ----------------- ##???
  4. translate("sooooso aaaaaaaaa") == "sos aaa" ------------------- ##Yes!!!