Re: sort in the list

2005-11-23 Thread Bengt Richter
On Tue, 22 Nov 2005 14:03:32 +0100, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >"Shi Mu" wrote: > >>I use Python 2.3 to run the following code: > a=[[1,2],[4,8],[0,3]] > a.sort() > a >> [[0, 3], [1, 2], [4, 8]] > >> I wonder whether the sort function automatically consider the firs

Re: sort in the list

2005-11-22 Thread Fredrik Lundh
"Shi Mu" wrote: >I use Python 2.3 to run the following code: a=[[1,2],[4,8],[0,3]] a.sort() a > [[0, 3], [1, 2], [4, 8]] > I wonder whether the sort function automatically consider the first > element in the list of list as the sorting criteria or it just happens > to be? the