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 1997

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

Search the Archive

Re: Combining Lists?

  • To: mathgroup at
  • Subject: [mg8603] Re: Combining Lists?
  • From: "Dr Stephen P Luttrell" <luttrell at>
  • Date: Tue, 9 Sep 1997 03:07:18 -0400
  • Organization: Defence Research Agency
  • Sender: owner-wri-mathgroup at

Alan Hunter <akh6n at> wrote in article
<5ut8r0$a50 at>...
> 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. 

Transpose[{{1, 2, 3} ,{4, 5, 6}}]

produces the output


Dr Stephen P Luttrell                  luttrell at
Adaptive Systems Theory                01684-894046 (phone)
Room EX21, Defence Research Agency     01684-894384 (fax)           
Malvern, Worcs, WR14 3PS, U.K.

  • Prev by Date: Re: Re: Integer Values
  • Next by Date: Re: Something like Flatten
  • Previous by thread: Re: Combining Lists?
  • Next by thread: Re: Combining Lists?