Calculate letter frequency using collections.defaultdict