Can someone pick out my fault and give me the idea to do this in this way?


my code below:
def anti_vowel(text):
for index, c in enumerate(text):
if c in 'aeiouAEIOU':
# index=index-1

return text


Hello, @goyeahyeah.
I found it amazing that instead of going the usual way, which is iterate through a string, you're using tuples, very nice!
Thing is in some cases, like "gggga" your solution works because the vowel is the last element but when we try "mike", "gabriel" and others, it doesn't.
Tuples are immutable so even by doing index-1 it just won't work, whenever it iterates, it will get the next pair with the index (which didn't change because of that) and value, which in this case is, a character.

I think you could check if the element is not on the set "aeiouAEIOU" and insert them into a new tuple and later convert everything inside of it into a new string. It will be unnecessary but since you want to use it that way, here's a solution.

Quote me if you need help with anything else!

Best regards,