Delete words which have 2 consecutive vowels in it
Question: What i want is remove the words which have more than two consecutive vowels in
it. So input:

    
    
    s = " There was a boat in the rain near the shore, by some mysterious lake"
    

Output:

    
    
    [boat,rain,near,mysterious] 
    

So here is my code. I was just wondering if there is any better way to do this
or is this efficient enough.And if you can do this with python dict or lists
are ok? :) I'm new to python so yeah. :) comments would be nice.

    
    
    def change(s):
    vowel = ["a","e","i","o","u"]
    words = []
    a = s[:].replace(",","").split()
    for i in vowel:
        s = s.replace(i, "*").replace(",","")
    for i,j in enumerate(s.split()):
        if "**" in j:
            words.append(a[i])
    return words
    


Answer: Alternatively, you could always use regular expressions and list comprehension
to get the list of words:

    
    
    >>> import re
    >>> [x for x in s.split() if re.search(r'[aeiou]{2}', x)]
    ['boat', 'rain', 'near', 'mysterious']
    

`s.split()` splits the sentence into a list of words. The expression `[x for x
in s.split()]` considers each word in this list in turn.

The `re.search(r'[aeiou]{2}', x)` part of the expression searches each word
for two consecutive letters from the group `[aeiou]`. Only if two consecutive
vowels are found is the word put in the new list.

