I am trying to remove wowels in a random text.
def disemvowel(string):
wowels = "aeiouAEIOU"
wowellist = list(wowels)
correctedList = list(string)
for i in correctedList:
for j in wowellist:
if i == j:
j = wowellist[0]
correctedList.remove(i)
print(i)
string = "".join(str(x) for x in correctedList)
return string
print(disemvowel("Your text wowel will be removed!"))
But when removed first wowel "o" second one "u" is not processed. I think it is due to correctedList.remove(i)
but how can I remove an element in the list another way?