Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1997
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

Re: Combining Lists?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8584] Re: [mg8572] Combining Lists?
  • From: seanross at worldnet.att.net
  • Date: Sun, 7 Sep 1997 22:13:04 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Alan Hunter wrote:
> 
> I think this is a pretty easy question so I hope someone will be able
> to answer it, I just can't figure out how to do it.  If you have two
> lists, for example {1, 2, 3} and {4, 5, 6}.  Is there a command to
> combine them into a series of XY pairs like {{1, 4}, {2, 5}, {3, 6}}?
> The book doesn't seem to have such a command, but I suspect one exists.
> Thanks for any help you can provide.
There is no specific command.  You have to manipulate the lists using
things like Transpose, Take, Map, MapAt, Join ,Inner etc.  In your case:

list1={1,2,3};
list2={4,5,6};
listofpairs=Transpose[{list1,list2}]


  • Prev by Date: Re: Something like Flatten
  • Next by Date: Re: MeijerG special function
  • Previous by thread: Combining Lists?
  • Next by thread: RE: Combining Lists?