how shall i proceed further? i can not understand how using the split function is going to make the text differentiate into words?

def censor(text,word):
    " ".join(text)
    for i in text:
        if i == word:


you need to store the result of text.split() in a variable

just like you did with len() on the line above

.join() is for joining string into list after censoring, it should be very late in your program, its the last step


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