I can't understand. For example, if i print like this: print censor("this is true my boy", "true story"). Why it prints "this is true my boy"?
"true story" is not treated as two words, but one. The program is not able to parse 'true' out of that phrase. Try passing just