No error message is given, but the code returns "None".
The code is meant to replace a specific censored word with asterisks.
I would appreciate any assistance, thanks!
Replace this line with your code. def censor(text, word): text_list = text.split() word_list = word.split() word_length = len(word) for x in text_list: while x in word_list: x = "*" * (word_length) "".join(text_list) return text_list print censor("hello all", "all") #testing