Censor Failed


#1

Can someone please tell me what is wrong with my code?

censor


#2

.join() is a method to join a list into a string, but result is already a string


#3

Thank you. So my understanding given that is I should be able to just return the result without having to use join. However I still get a failure error.
censor2


#4

that is possible, but where did all the spaces in your sentences go then? now censor("this hack is a wack hack", "hack") should return "this **** is a wack ****", but it returns "this****isawack****"


#5

I understand now. Thank you. This is my final code that succeeded:
censor3_success


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.