My code simply returns the input, I've also tried using thing=="*" * len(word) and the same thing happens

def censor(text, word):
    words = text.split()
    for thing in words:
        if thing == word:
            thing.replace(thing, "*" * len(word))
    return " ".join(words)


you execute a replace action, where do you store the result of this replace action? So far i see, nowhere

Replace is boring to use in this exercise, it allows for a one liner solution, so think about if this is what you want


I got it, I ended up using thing = "*" * len(word) creating a new list and appending everything to it


That is a much better approach at writing your own algorithm, good job :slight_smile: