for i in word:
if i in text:
i="*" new_text+=i return new_text
print censor("hey hey why","hey")
the code above was intended to be the basis loop for the Censor session. however, somehow the loop would not work. instead of replacing all Text Characters with "*", it would replace only the first one and won't show any other character, as could be seen from the copied screenshot. have no idea why is it. do you?
Replace this line with your code.