Your function fails on censor(“hey hey hey”,“hey”). It returns “None” when it should return " *".
I ran it on IDLE and it worked but I just can’t get passed on the website. Any suggestion?
def censor(text, word): length = len(word) newtext = text.replace(word, "*" * length) print (newtext)
Thank you guys!