Remove vowels from a string using Python or Anti- Vowel

Removing vowels from text is very easy using python. But through internet search I found very hard way to do this. Just look the following links
http://stackoverflow.com/questions/23176001/remove-vowels-from-a-string
http://stackoverflow.com/questions/17299581/loop-forgets-to-remove-some-items
http://pythonfiddle.com/remove-the-vowels/

But removing vowel could be done very easy and clean way, Just have a look


  def anti_vowel(text):
    for char in text:
        if char in "aeiouAEIOU": 
            text= text.replace(char, "") # Here vowel will be replaced by ""
    return text 



Comments

Popular posts from this blog

পিৎজা এবং বই

How to Download Video from Youtube - The Easiest way