Created
December 2, 2015 10:05
-
-
Save riyadhalnur/95ca6dc899a85ce88dfd to your computer and use it in GitHub Desktop.
Strip all vowels from a given string
This file contains hidden or 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): | |
vowels = ['a','e','i','o','u'] | |
result = [] | |
for i in range(len(text)): | |
if text[i].lower() not in vowels: | |
result.append(text[i]) | |
return ''.join(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment