So I remember seeing string.replace( ) somewhere before I started this exercise. I added it and played around with it, and after working through a few error messages I was a bit surprised when it worked. Makes me feel like I'm playing the system. Is this a cheap way to solve it in regards to what codecademy wants?
def censor(text, word): for h in text: j = len(word) * "*" return text.replace(word, j)