Practise makes perfect https://www.codecademy.com/en/courses/python-intermediate-en-rCQKw/1/2?curriculum_id=4f89dab3d788890003000096
I have to print the string as it is except for the vowels. I was able to use a for loop to do it but am unable to do so with the while loop. I cannot seem to debug my fault.
def anti_vowel(text): s = "" le = len( text ) - 1 #since index starts at 0 we must negate by 1 while le >= 0: if text[le].lower() not in "aeiou": s += text[le] le -= -1 return s
I get the string out of index error, even though I have (apparently) taken care of it.Help please!