def anti_vowel(text): spare = " " for i in text: if i not in "aeiouAEIOU": spare += i return spare I don't understand the error is : Oops, try again. Your function fails on anti_vowel("Hey look Words!"). It returns " Hy lk Wrds!" when it should return "Hy lk Wrds!". Both the results are same it is returning the same thing then why error?
spare should be an empty string:
spare = ""
you had a additional space at the start
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.