So I have a list of words `wordList = list().\' Right now, I am counting each letter in each of the words throughout the whole list using this code
cnt = C
An alternative approach using the iterator combinators in itertools:
itertools
import collections import itertools cnt = collections.Counter(itertools.chain.from_iterable(itertools.imap(set, wordList)))