Hi, I am having issues with this section of the course as well. I keep refining my code and this is as close as I can get, and it appears to censor the right words, but it appends them to the end of the string without putting them back in their original places. Could you suggest what I can do?
def censor(text, word): product =  new_txt = text.split(" ") for i in new_txt: if i == word: new_word = "*" * len(word) new_txt.append(new_word) else: product.append(i) return " ".join(product)
I get the following error: > Oops, try again. Your function fails on censor("Yo go fro yo go","go"). It returns "Yo fro yo ** **" when it should return "Yo ** fro yo **".