Problem in the code?


#1

def anti_vowel(text):
r = list(text)
for i in text:
if i == 'aeiouAEIOU':
r.remove(i)
return ''.join(r)

ERROR MESSAGE:Oops, try again. Your function fails on anti_vowel("Hey look Words!"). It returns "Hey look Words!" when it should return "Hy lk Wrds!".


#2

here:

if i == 'aeiouAEIOU':

i will be a single letter of text string (one letter at a time), how can a single letter equal aeiouAEIOU?


#3

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