Help understanding the decisions *behind* python?

Tycho Andersen tycho at
Mon Jul 20 18:43:16 CEST 2009

On Mon, Jul 20, 2009 at 11:27 AM, Phillip B
Oldham<phillip.oldham at> wrote:
> <snip>
> We often find we need to do manipulations like the above without
> changing the order of the original list, and languages like JS allow
> this. We can't work out how to do this in python though, other than
> duplicating the list, sorting, reversing, then discarding.

I have no idea about why the design decisions were made. You might
take a look at the sorted() function:

It will do what you want.


More information about the Python-list mailing list