Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
aldanor
on Nov 10, 2015
|
parent
|
context
|
favorite
| on:
Counting Things in Python: A History
Or this (not efficient but fun, and using a dict comprehension and no itertools):
{a: sum(a == b for b in colors) for a in set(colors)}
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: