Actually, I think I got it now. Here is what I did:
for num in alist:
... if adict.has_key(num): ... x = adict.get(num) ... x = x + 1 ... adict.update({num:x})
A simpler way to do this last line is adict[num] = x
... else: ... adict.update({num:1})
and adict[num] = 1
Kent -- http://mail.python.org/mailman/listinfo/python-list