I get the folloing error message:
"Oops, try again. Did you create a function called censor? Your code threw a "global name 'joined' is not defined" error."
As it says in the title - I'm trying to go down the .split - .join route, but can't make it work. Can anybody help? Where's my mistake? Thanks!
def censor(text, word): split = text.split() for x in split: if x == word: for i in x: x.replace(i, "*") joined == " ".join(split) return joined