Skip to content

Commit

Permalink
Update vowel remover function.py
Browse files Browse the repository at this point in the history
reduced runtime by roughly .29 seconds at 100000 runs
  • Loading branch information
Piombacciaio authored Mar 10, 2023
1 parent 7360067 commit e24d0f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vowel remover function.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
def vowel_remover(text):
string = ""
for l in text:
if l.lower() != "a" and l.lower() != "e" and l.lower() != "i" and l.lower() != "o" and l.lower() != "u":
if l.lower() not in "aeiou":
string += l
return string
print vowel_remover("hello world!")
print(vowel_remover("hello world!"))

0 comments on commit e24d0f1

Please sign in to comment.