this is clever, but i would perhaps opt for the clearer `return (text == full_term) ? 1 : 0`  (unless your version is a common python idiom)