defdisemvowel(string):"""Removes all occurences of vowel from the string.
Args:
string (str): The input string.
Returns:
temp_string (str): The resultant string with vowels removed.
"""final_string=""foriinstring:ifi.lower()in["a","e","i","o","u"]:continueelse:final_string+=ireturnfinal_stringif__name__=='__main__':print(disemvowel("This website is for losers LOL!"),"Ths wbst s fr lsrs LL!")
Python solution.
you could use
regex
to keep it simple :)I am yet to study about regexes :)