Last active
August 29, 2015 13:56
-
-
Save Fergmux/8946068 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def anti_vowel(text): | |
for x in text: | |
c = x.lower() | |
n = list(text) | |
if c in 'aeiou': | |
i = text.index(c) | |
n[i] = '' | |
text = ''.join(n) | |
return text |
import re
def anti_vowel(text):
return re.sub(r'[aeoui]', '', text, flags=re.I)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Case sensitive....