noydb <jenn.du...@gmail.com> writes: >> counts = {} >> for thing in long_list: >> key = make_key(thing) >> if key in counts: >> counts[key] += 1 >> else: >> counts[key] = 1
counts = {} for thing i long_list: key = make_key(thing) counts[key] = 1 + counts.get(key, 0) > How do you add all the records in the particular field of interest > into long_list? I don't understand this question. Where are they coming from? -- http://mail.python.org/mailman/listinfo/python-list