Just plucking away at the Censor Dispenser challenge project and I managed to hammer out the first e-mail with a bit of review/web digging.
My question is in regards to format, or to be more accurate, console output of my solution.
#CONVERTS EMAIL TO LIST, CENSORS AND STRIPS
def censor_file(body, target):
for phrase in body:
censored_word = body.replace(target, "REDACTED").replace("\n", "")
to produce the email with censorship in place. My question is once the string has been transferred to a list like this, is there a shorthand, or reasonably efficient method for that matter to revert the list into the previous format to help its readability?
Thanks for your time!