To count number of quadruplets with sum = 0
Fri Mar 16 16:56:01 CET 2007
Steven Bethard <steven.bethard at gmail.com> writes:
> > According to a post by Raymond Hettinger it's faster to use that
> > iterator instead of `int`.
> Yep. It's because the .next() method takes no arguments, while int()
> takes varargs because you can do:: ...
Heh, good point. Might be worth putting a special hack in defaultdict
to recognize the common case of defaultdict(int).
More information about the Python-list