Struck!


#1



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


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):
    x=len(word)
    text.split()
    " ".join(text)
    for i in text:
        if i == word:


#2

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


#3

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