I’m having a hard time cleaning up the output for part three of the Censor Dispenser project (proprietary_terms). This is the code I’m using:
def censor_propietary_terms(email): for term in proprietary_terms: email = email.replace(term, 'X') return email
If I print censor_propietary_terms(email_two) I get the following output:
Good Morning, Board of Investors, Lots of updates this week. The Xs have been working better than we could have ever expected. Our initial internal data dumps have been completed and we have proceeded with the plan to connect the system to the internet and wow! The results are mind blowing. She is learning faster than ever. Her learning rate now that X has access to the world wide web has increased exponentially, far faster than we had though the Xs were capable of. Not only that, but we have configured X X to allow for communication between the system and our team of researcXs. That's how we know X considers Xself to be a X! We asked! How cool is that? We didn't expect a personality to develop this early on in the process but it seems like a rudimentary X is starting to form. This is a major step in the process, as having a X and X will allow X to see the problems the world is facing and make hard but necessary decisions for the betterment of the planet. We are a-buzz down in the lab with excitement over these developments and we hope that the investors share our enthusiasm. Till next month, Francine, Head Scientist
I would really appreciate some help with understanding what’s going on here and how I can return the expected output for this part of the project.