This code below prints: "Crlo is the boy in sun" Exactly what it should produce.
b = "a" text = "Carlo is the boy in sun" print text.replace(b,"")
so I wanted to use this logic to extend the "b" list and place it in a loop. like so:
def no_vowel(text): vowels = ("aei") no_vowel_text = ("") for i in text: no_vowel_text += i for i in vowels: no_vowel_text.replace(i,"") print no_vowel_text
this produces the whole sentence without replacing anything.
Can you point out the direction?