Anti_vowel


#1



https://www.codecademy.com/courses/python-intermediate-en-rCQKw/1/2?curriculum_id=4f89dab3d788890003000096#


Your function fails on anti_vowel("Hey look Words!"). It returns " Hey look Words!" when it should return "Hy lk Wrds!".


def anti_vowel(text):

    sin = ''
    
    for x in text:
        if x in 'QWRTYPSDFGHJKLZXCVBNMqwrtypsdfghjklzxcvbnm!?' or ' ':
            sin = sin + x
    return sin


#2

What happens when you include the space character in you main phrase and drop the or ' '?


#3

The first time I put it together, didn't work so I try with or. Because I don't know what's the problem I try changing


#4

I solved with this code:

def anti_vowel(text):

sin = ''

for x in text:
    if x not in 'aeiouAEIOU':
        sin = sin + x

return sin

Close the topic. Thanks


#5