MathGroup Archive 1997

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

Search the Archive

Re: Combining Lists?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8608] Re: [mg8572] Combining Lists?
  • From: "C. Woll" <carlw at u.washington.edu>
  • Date: Tue, 9 Sep 1997 03:07:22 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Alan,

One simple way is to use Transpose. Thus

list1={1,2,3}
list2={4,5,6}

and

Transpose[{list1,list2}]

will give you the result you want.

Carl Woll
Dept of Physics
U of Washington

On Sat, 6 Sep 1997, 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.
> 
> 



  • Prev by Date: Re: Re: Defining Real Expressions
  • Next by Date: Re: Combining Lists?
  • Previous by thread: Re: Combining Lists?
  • Next by thread: Re: Combining Lists?