What\'s the best way to convert a list/tuple into a dict where the keys are the distinct values of the list and the values are the the frequencies of those distinct values?<
Kind of
from collections import defaultdict fq= defaultdict( int ) for w in words: fq[w] += 1
That usually works nicely.