<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>
<Below this line, add a link to the EXACT exercise that you are stuck at.>
<In what way does your code behave incorrectly? Include ALL error messages.>
what if I don’t want to use .split function, in fact it doesn’t work for situations like strings do not have blank space in between.
If so, .split won’t work
<What do you expect to happen instead?>
please advise, how should I revise my code in below or how should i continue finishing it, thanks.
(I thought about this quesitons for 2 days in total, over the weekend
def censor(text, word): l = len(text) w = len(word) for i in range(l): if text[i] == word: for j in range(w): if text[i+1+j] == word[j+1]: continue else: break Share with all of you another two versions of censor practice, with use of .split '''def censor(text, word): wordList = text.split() result =  print wordList for w in wordList: if w == word: result.append( "*"*len(word)) else: result.append(w) return " ".join(result)''' '''def censor(text, word): wordList = text.split() print wordList for w in wordList: if w == word: wordIndex = wordList.index(w) wordList[wordIndex] = "*"*len(word) return " ".join(wordList)'''