Help for censor


#1

Hello!
can someone help me with my code below, i cant seem to get its logic!
thanks! :smile:

this is my code:
def censor(text,word):
for word in text:
word=""(len("word"))

print text

(its indented correctly but it doesnt seem to show)


#2

How to format?
1) copy and paste your code
2) highligt/select your whole code
3) then look for this </> and press it.
or
simply press ctrl + shift + c and past the code inside the highlighted area.
Now lets talk about your code which your for loop is wrong because word and text is two different variables you cannot loop like that.


#3

Can you expain what you trying to do replacing word with text?