Question: Sorting a list of lists

Dear all,

I am using version 12. I would like to sort a list of lists of  integers in respect to some of the terms of the sublists.

For example, the list

[  [3,5], [2,10], [9,1], [4,2], [7,3]  ]

would be sorted as:

[  [9,1], [4,2], [7,3], [3,5], [2,10]  ]

in respect to the second variable.

Actually, I found that the sort command with  the 'lexorder'[n] option would exactly this, except that it

seems that it doesn't work with numbers, but only with letters.

Any ideas?

 

Thanks in advance..
 

 

Please Wait...