Your code threw a "list indices must be integers, not str" error.
I have been trying to work out this problem for a while. It seems like this should work but it keeps giving me the above error message. Any help would be great!
def censor (text, word): newText = text.split(" ") newWord= "*" * len(word) for i in newText: if newText[i] == word: newText[i] = newWord " ".join(newText) return newText