Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's also itertools.groupby, maybe not much shorter (need to define the keyfunc, sort, then iterate), but it does make the intent obvious.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: