8.0 Anti Vowel SOLVED AND EXPLAINED


#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 "['H', 'y', ' ', 'l', 'k', ' ', 'W', 'r', 'd', 's', '!']" when it should return "Hy lk Wrds!".

i want to print without the " , s "


Replace this line with your code. 
def anti_vowel(text):
    #lenght= len(text)
    # text_list = list(text)
    no_vowels=[]
    for c in text:
      if c not in "AEIOUaeiou":
        no_vowels.append(c) 
        
         
    return no_vowels


#2

you have a list, you need a string. You can use the built in .join() function to join a list into a string


#3

Thanks a lot Stetim94, for u people whos reading i left u my working code so u can move on with the course ! i will comment every line so u can understand it better.

def anti_vowel(text): // creating our function
no_vowels="" //create an empty STRING
for c in text: // we iterate trought every letter on "text" so we can analyze
if c notin "AEIOUaeiou": //if the letter "c" is not in that list (lowecase and uppercase) u can , move on
no_vowels = no_vowels + c // now no_vowels wich cointained nothing have the letter "c" wich , , passed the if condition.

return no_vowels
                                               Hope this may help you stranger.

#4