Censor


#1



My code is below the error message.I don't know what's wrong with the code ,because the result is right when I run the program in Sublime .

Oops, try again. Your function fails on censor("hey hey hey","hey"). It returns "None" when it should return "*** *** ***".


**def censor(text,word):
    text=text.split(" ")
    
    for t in text:
    	if word==t:
    		i="*"*len(word)
    text=[i if t==word else t for t in text]
    print " ".join(text)**


#2

you print the censored string, you should return the censored string


#3

Thanks.:joy::joy::joy::joy:


#4