from functools import reduce
def get_word_count(text):
    return Counter(word for word in (wd.lower() for wd in text) if word in
        lookfor)
return get_word_count

def get_words_in_common(counters):
    return reduce(operator.and_, (set(c) for c in counters))

def main():
    wordcount = word_finder(search_words)
counters = [wordcount(wordlst) for wordlst in search_data]
common_to_all = get_words_in_common(counters)
print(common_to_all)
if __name__ == '__main__':
    main()
Comparing two large lists in python