8/15 anti_vowel


Noob here,
I have written my code for this section and it tells me that when putting “Hey look Words!” into my function, it returned “Hy lk Words!”
Can anyone explain the reason it ignored the “o” in “Words”

def anti_vowel(text):
  listed_char = []
  for char in text:
  for c in listed_char:
    if c in 'aeiouAEIOU':
  return "".join(listed_char)


I figured it out, it seems there was another post similar to mine on here that I hadn’t seen and that had the answer to my problem.

For anyone that is interested, here is my new function that works:

def anti_vowel(text):
  non_vowel = []
  for char in text:
    if char not in 'aeiouAEIOU':
  return "".join(non_vowel)


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