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 2004

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

Search the Archive

Re: Simple list operation

  • To: mathgroup at
  • Subject: [mg45663] Re: Simple list operation
  • From: Bill Rowe <readnewsciv at>
  • Date: Sat, 17 Jan 2004 02:34:32 -0500 (EST)
  • Sender: owner-wri-mathgroup at

On 1/16/04 at 6:04 AM, weh at (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?