Oops, try again.
Your function fails on censor("hey hey hey","hey"). It returns "* * * * * * * * *" when it should return "*** *** ***".
I expected that the strings should combine into one string, instead they input each individual letter of words as a string on the w list. I am aware of the error, but I don't understand how the error arises.
Replace this line with your code. def censor(text, word): q = text.split(" ") w =  for words in q: if word in words: w += '*' * len(word) else: w += words z = " ".join(w) return z print censor("this hack is wack hack", "hack")
Also, this is the first time I have asked a question on Codecademy, so I apologize in advance if I did anything wrong.