python compare string to list of words