Anti_vowel (8/15)


def anti_vowel(text):
__vowels = [“a”, “e”, “i”, “o”, “u”]
__for vowels in text:
____return text

Sorry, guys, but could smbd help me? I am sure there are longer methods to do, but i want to be efficient.

My problem is that I tend to oversimplify code too much…

P.S. I know I am not accounting for lowercase and uppercase vowels. Just wanted to check if that would work



for vowels in text:

will simply iterate over text, that is it.

del is a very difficult approach to solve this problem, ideally you would append consonants to a new list/string. you can use in keyword to check if character from text is in vowels list

also, return should be outside the loop, you want to return the string after the loop has finished running


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.