a question regarding conciseness

Remco Gerlich scarblac at pino.selwerd.nl
Thu Feb 21 12:45:45 EST 2002

Gerson Kurz <gerson.kurz at t-online.de> wrote in comp.lang.python:
> I found an easier solution:
> sort = lambda x:(x.sort(),x)[1]

def sort(x): x.sort(); return x

is equally concise and doesn't have to do the odd tuple thing :)

Remco Gerlich

More information about the Python-list mailing list