RE: sort list
- To: mathgroup at smc.vnet.net
- Subject: [mg47216] RE: [mg47208] sort list
- From: "Reece, Daryl" <Daryl.Reece at goody.com>
- Date: Wed, 31 Mar 2004 02:57:38 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Since your address bounces for me... Sort[List, ( #1[[2]] < #2[[2]])&] should do the trick -----Original Message----- From: Guibout [mailto:guibout at ifrance.com] To: mathgroup at smc.vnet.net Subject: [mg47216] [mg47208] sort list Hi, I have a list of the form {{something1,x1},{something2,x2},{something3,x3}} where x1,x2, x3 are numbers. I want to sort this list with respect to xi. In other word if x2<x3<x1 I want Mathematica to produce: {{something2,x2},{something3,x3},{something1,x1}} Thanks for your help Vincent