Censor help


Trying to figure this problem. Any assist would be nice. Thanks


Replace this line with your code. 
def censor(text, word):
    bear = "*" * 4
    wow = ""
    for c in wow:
        word = bear(c)
        wow += bear    
    return " ".join(wow)


Hi, @terrence823 ,

The main conceptual problem with your censor function is that instead of processing the two variables, text and word, that are supplied as parameters, it ignores them. If someone tries to use your function, for example, as follows ...

print censor("When half the bee is not a bee", "bee")

It does not process the strings, "When half the bee is not a bee" and "bee", which are represented by the parameters, text and word, and therefore does not give the expected output.


Lol yeaa I realized the earlier. I should of just use what was given to me. Thanks though