Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'How to sort Strings in SubLists?' topicStudent Support Forum > General > Archives > "How to sort Strings in SubLists?"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
01/26/12 01:18am

Less does numerical comparisons, OrderedQ does cannonical comparisons.

In[1]:= Sort[{{"aa",2},{"cc",1},{"bb",3}},OrderedQ[{#1[[1]],#2[[1]]}]&]

Out[1]= {{aa,2},{bb,3},{cc,1}}

URL: ,

Subject (listing for 'How to sort Strings in SubLists?')
Author Date Posted
How to sort Strings in SubLists? centurion 01/25/12 09:28am
Re: How to sort Strings in SubLists? Nasser M. Ab... 01/26/12 01:12am
Re: How to sort Strings in SubLists? Bill Simpson 01/26/12 01:18am
< Previous CommentHelp | Reply To Comment | Reply To Topic