[EMAIL PROTECTED] wrote: > if histogram.has_key(s): > histogram[s] += 1 > else: > histogram[s] = 1
I wonder if
histogram[s] = histogram.get(s, 0) + 1
would be more efficient...
Cheers,
--
Klaus Alexander Seistrup
Copenhagen, Denmark
http://ipsum.dk/
--
http://mail.python.org/mailman/listinfo/python-list
