Censor Dispenser Challenge - code review / help with challenge

That’s true assuming that the input is something we can edit and even though it isn’t really stated in the exercise that we can’t. I’m not sure that we are allowed to, since we are supposed to work on our code and (I guess) not on what’s provided, and if I remember correctly (maybe not) handling plurals was a part of the problem.
So my assumption was - “What’s provided is not to be messed with!”
But I think that’s not really up to me or you to decide.
Creators didn’t really specify that problem so I guess it’s up to peronal decision how you are goint to handle it!

Couldn’t agree more!
I think it only creates confusion :frowning:

Hi all,

I am a beginner in python and codecadamy and wanted some help/explanations for the censor dispenser challenge. I was able to figure out step 2 by myself (censor out a phrase), but I am struggling to figure out how to censor a list of words in step 3. Please help and critique if necessary. Here was my function for step 2.

email_one = open(“email_one.txt”, “r”).read()
email_two = open(“email_two.txt”, “r”).read()
email_three = open(“email_three.txt”, “r”).read()
email_four = open(“email_four.txt”, “r”).read()

def censor(phrase, text):
for words in text:
replaced = text.replace(phrase, “**** *****”)
return replaced
print (censor(phrase, email_one)

sorry about my code. it didn’t format correctly. I guess I wanted to ask if there was a way to censor multiple words in the same kind of function I made for one phrase?