What am i doing wrong here (Censor Dispenser Challenge)?

I am trying to censor the negative words and proprietary words using following code but it’s just isn’t working as expected:

email_three = open("email_three.txt", "r").read()

proprietary_terms = ["she", "personality matrix", "sense of self", "self-preservation", "learning algorithm", "her", "herself"] 

negative_words = ["concerned", "behind", "danger", "dangerous", "alarming", "alarmed", "out of control", "help", "unhappy", "bad", "upset", "awful", "broken", "damage", "damaging", "dismal", "distressed", "distressed", "concerning", "horrible", "horribly", "questionable"]

def censor3(text, lst1, lst2):
  indices = []
  for i in lst1:
    if i in text:
  terminal_index = indices[1]
  text1 = text
  text2 = text1[terminal_index+1:]
  for i in lst1:
    if i in text:
      text1 = text2.replace(i, "REDACTED")
  text3 = text[:terminal_index+1] + text1

  return censor2(text3, lst2)

print(censor3(email_three, negative_words, proprietary_terms))

Any help will be great.

Just throwing this in… How do we go about findnext() as a way to exhaust that term’s occurrences in the string?