On Mar 13, 9:26 am, ru...@yahoo.com wrote:
> That should be:
> d = {}
> for item in m:
      key = item[0];  value = item[1]
>     if key is None or value is None: continue
>     if key not in dict:
>         d[key] = [1, value]
>     else:
>         d[key][0] += 1
>         d[key][1] += value

That's it.  Any other mistakes, you find 'em.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to