MathGroup Archive 2004

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

Search the Archive

Re: Simple list operation


On 1/16/04 at 6:04 AM, weh at snafu.de (Dr. Wolfgang Hintze) wrote:

> Given two lists 

> In[10]:=
> x = {a, b, c};

> In[11]:=
> y = {A, B, C};

> how can I get the list of pairs

> p={{a,A},{b,B},{c,C}}?

There are a number of ways to do this. For example,

p = Transpose@{x,y} or
p = MapThread[List, {x,y}]

will do what you want
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Anyone using the Units package extensively?
  • Next by Date: StruveH runtime error
  • Previous by thread: RE: Simple list operation
  • Next by thread: Formatting notebooks for Menu File:New?