I have a string name = "Aaron" and would like to remove all the vowels. I am using remove() but if the char is repetive like letter 'a' in this case it stays in the string. Any suggestions ? Here is my code :
def disemvowel(word):
word_as_list = list(word.lower())
print(word_as_list)
vowels = ["a", "e", "i", "o", "u"]
for char in word_as_list:
for v in vowels :
if char == v :
word_as_list.remove(v)
return "".join(word_as_list)
print(disemvowel("Aaaron"))