def filter_name(name, whitelist, blacklist):
    """ If a string name contains one or more words from whitelist but
    no words from blacklist return true else return false. """
    return any(word.lower() in name.lower() for word in whitelist) and not any(word.lower() in name.lower() for word in blacklist)