Censor


#1



https://www.codecademy.com/courses/python-intermediate-en-rCQKw/1/4?curriculum_id=4f89dab3d788890003000096#


Your code looks a bit off--it threw a "invalid syntax (python, line 6)" error. Check the Hint if you need help!


def censor(text, word):
    splited=text.split(' ')
    for i in splited:
        if i==word:
            text=text.replace(word,"*"*(len(word))
    return text


#2

look at your parentheses on the line above the error message line


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.