Anti_vowel (Help Me!)


#1

result = []
def anti_vowel(text):
for t in text:
if t not in "aeiouAEIOU":
result.append(t)
return ('').join(result)

print anti_vowel("Hey look Words!")

Hi.. i would like to know whats wrong with my code.. it does print out what it want but cant seems to go to the next stage.. would like to know what wrong with it.. thanx in advance :smiley:


#2

Needs to be defined inside the function so it is empty at the start of each call.

Explanation...

Your code runs when submitted. The result list is populated with the results of that run. When the lesson checker runs the code that data is present and corrupts the data it sends. The returning data is not what it expects, so it fails the submission.


#3

THANK YOU!!! :smiley:


#4

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