Code error: Oops, try again. Your function fails on censor("hey hey hey","hey"). It returns "None" when it should return "*** *** ***".
According to the console, my code is performing correctly, but the error message is telling me its failing. The only thing I can think of is that the exercise wants me to use the split function?
def censor(text, word): n = len(str(word)) text = text.replace(word, "*" * n) print text censor("hey hey hey", "hey")