Define a function called anti_vowel
that takes one string, text
, as input and returns the text with all of the vowels removed.
my code was
def anti_vowel(text):
newtext=''
vowels = 'aeiouAEIOU'
for n in text:
if n not in vowels:
newtext = newtext + n
return text
print anti_vowel ('bab')
I DID THE EXACT SAME THING AS THE SOLUTION however, the response given was
File “python”, line 15
if n not in vowels:
^
IndentationError: expected an indented block
may i know why