itertools.groupby

Paul Rubin http
Wed Jan 16 03:12:08 EST 2008


Tobiah <toby at tobiah.org> writes:
> I tried doing this with a simple example, but noticed
> that [].sort(func) passes two arguments to func, whereas
> the function expected by groupby() uses only one argument.

Use: [].sort(key=func)



More information about the Python-list mailing list