To count number of quadruplets with sum = 0
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Fri Mar 16 04:18:33 EDT 2007
In <7x6491k9t3.fsf at ruckus.brouhaha.com>, Paul Rubin wrote:
> "n00m" <n00m at narod.ru> writes:
>> h = collections.defaultdict(itertools.repeat(0).next)
>
> Something wrong with
> h = collections.defaultdict(int)
> ?????
According to a post by Raymond Hettinger it's faster to use that iterator
instead of `int`.
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list