Hello Y’all, looking for some help with my code…again!
def censor_email_two(email_2, lst):
for terms in lst:
index= 0 while index < len(email): index= email.find(terms, index) if index == -1: break if email2[index -1] == " " or email2[index -1]== "\n" or email2[index -1] == "(": for i in range(index, index+ len(terms)): email2[i]= "x" index+= len(terms)
ef censor_three(email, lst):
email= censor_email_two(email, lst)
for word in neg_words:
index= 0 if index < len(email3): index= email.find(word) for i in range(index, index + len(word)): email3[i]= "x"
So my problem is that “board o” in “Board of Investors” is also being “x”'d out, and I have no idea why.
If you are familiar with the project, I could use some help!