error message: Your function fails on censor(“hey hey hey”,“hey”). It returns “None” when it should return " *".
<What do you expect to happen instead?>
What i actually get when i print is the correct result, its just that the censored text is on the same line.
whole = text.split()
for x in whole:
if x == word:
print ("*" * (len(word))),
<do not remove the three backticks above>