Skip to content

Commit e24d0f1

Browse files
authored
Update vowel remover function.py
reduced runtime by roughly .29 seconds at 100000 runs
1 parent 7360067 commit e24d0f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vowel remover function.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
def vowel_remover(text):
22
string = ""
33
for l in text:
4-
if l.lower() != "a" and l.lower() != "e" and l.lower() != "i" and l.lower() != "o" and l.lower() != "u":
4+
if l.lower() not in "aeiou":
55
string += l
66
return string
7-
print vowel_remover("hello world!")
7+
print(vowel_remover("hello world!"))

0 commit comments

Comments
 (0)