Question: def censor(input_string, censor_words): for word in ???: # part 1 (goal: iterate over items in censor_ words) if word. lower() in input_string. lower(): input_string ???.replace(word,

def censor(input_string, censor_words): for word in ???: # part 1 (goal: iterate over items in censor_ words) if word. lower() in input_string. lower(): input_string ???.replace(word, ""*" * len(word)) # pa rt 2 return ??? # part 3 input_string censor_words "Wow the Packers beat the Cubs last night!" ["Packers", "Cubs", "darn"] censor(input_string, censor_words) [ Choose ] censor_words censor_words.join censor_words.append(word) input_string part 1 ??? part 2 ??? [ Choose] part 3 ??? [ Choose ]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
