Can anyone set me in the right direction for figuring out why my code isn't printing the asterix? I've been working on this so long now I can't see anything new. My hunch is that I'm not actually changing the matching word to the asterix. Please help! Many thanks.
def censor(text, word): stars = "*" * len(word) split_words = text.split() for each in split_words: if each == word: split_words[each] = stars censored_text = " ".join(split_words) return censored_text