I know that there are other ways to solve this exercise but I am really interested in learning about what is going wrong in this code. I have two problems:
1) when I use the print True/False to test the if statement with anti_vowel('ABC') I get each character to return True even though A should return False.
2) I am not getting any output from the print new_text command.
I had expected new_text to be a string of concatenated non-vowel characters
Thank you so much for your help, I have been going back and forth and I really want to understand what is wrong!
def anti_vowel(text): original_text = str(text.upper()) new_text = '' for n in range(0, len(original_text)): if original_text[n] != 'A'or 'O' or 'I' or 'U' or 'E': new_text = new_text + original_text[n] print True else: print False return new_text print new_text