"n00m" <[EMAIL PROTECTED]> writes: > h = collections.defaultdict(itertools.repeat(0).next)
Something wrong with h = collections.defaultdict(int) ????? > for x in e: > for y in r: > sch += h[-(x + y)] That scares me a little: I think it makes a new entry in h, for the cases where -(x+y) is not already in h. You want: for x in e: for y in r: sch += h.get(-(x+y), 0) -- http://mail.python.org/mailman/listinfo/python-list