Hi! So I just got done with this exercise and I wanted to improve upon my code so that I could censor a list of words. As of right now I don't even know where to start so I'd like some help with that. Thanks!
def censor(text,word): length_text = len(text) length_word = len(word) censorship = length_word * '*' for x in range(length_text): if text[x:x + length_word] == word: text = text.replace(word, censorship) return text