Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: sort list

  • To: mathgroup at
  • Subject: [mg47210] RE: [mg47208] sort list
  • From: "Florian Jaccard" <florian.jaccard at>
  • Date: Wed, 31 Mar 2004 02:57:19 -0500 (EST)
  • Reply-to: <florian.jaccard at>
  • Sender: owner-wri-mathgroup at

Bonjour Vincent!

Like this :

Sort[{{something1, 3}, {something2, 1}, {something3, 7}, {something4, 2}},
  #1[[2]] < #2[[2]] & ]

{{something2, 1}, {something4, 2}, {something1, 3}, {something3, 7}}

Meilleures salutations

Florian Jaccard

-----Message d'origine-----
De : Guibout [mailto:guibout at]
Envoyé : mar., 30. mars 2004 11:02
À : mathgroup at
Objet : [mg47208] sort list

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:
Thanks for your help

  • Prev by Date: Is there any productive way to use Mathematica + pdfLaTeX?
  • Next by Date: Re: Expansion of an exponential expression
  • Previous by thread: RE: sort list
  • Next by thread: Re: sort list