My professor has this function on his slides:
def censor(str): for ch in "aeiouAEIOU" str = str.replace(ch, "*") return st