Question: I am trying to write a function that takes a string as input and returns a string with all vowels repeated 4 times. 

*eg: `apple` becomes `aaaappleeee`*

It works for every vowel, except for *e*, in which it repeats *e* an egregious amount of times.

Python 3. I have tried playing with the replace function, changing the replacement value to `i+i+i+i`, `i*4`, `i(4)`, `(i+i)*2`, but nothing seems to help. 

```
def exclamation(string):
    for i in string:
        if i in 'aeiou':
            string = string.replace(i, i*4)
    return string + '!'

```

`exclamation('excellent')` should return `eeeexceeeelleeeent!`

however, it returns:
 `eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeexceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeelleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeent!`

As stated, the function works fine for all other vowels, except *e*.

Thank you!

Answer: 
You shall never modify something you're iterating over, store the modified word in a new variable. Modifing your code it would be something like

```
def exclamation(string):
    new = ''
    for i in string:
        if i in 'aeiou':
            new += i*4
        else:
            new += i
    return new + '!'

```
def exclamation(string):

```
result = ''
for i in string:
    if i in 'aeiou':
        vowel = i * 4
    else:
        vowel = i
    result += vowel
return result + '!'

```

**The reason why replace didnt work for excellent is because we have 3 'e' in which means for each of the 'e' in the loop, replace will multiply by 4 which will definitely give you 12 'e's per one 'e' in excellent**