RE: combining lists

• To: mathgroup at smc.vnet.net
• Subject: [mg32450] RE: [mg32435] combining lists
• From: "Florian Jaccard" <jaccardf at eicn.ch>
• Date: Mon, 21 Jan 2002 02:55:03 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Hello !

Tranpose[{list1,list2}]

does it !

Meilleures salutations

Florian Jaccard
EICN-HES
e-mail : jaccardf at eicn.ch

-----Message d'origine-----
De : Harald von der Osten-Woldenburg [mailto:hvdosten at lb.netic.de]
Envoyé : dim., 20. janvier 2002 01:04
À : mathgroup at smc.vnet.net
Objet : [mg32435] combining lists

Hi,

because I feel that I am again and again starting at the same point
after a while, just a short question.

How can I combine two lists, say:

list1={{x1,y1},{x2,y2},...,{nx,ny}} and
list2={{a1,b1},{a2,b2},...,{an,bn}}

so that the combination would be:

combined={{{x1,y1},{a1,b1}},{{x2,y2},{a2,b2}},....,{{xn,yn},{an,bn}}}

I tried something like

combi=Join[Take[#2]&,  list1,  Take[#,2]&,  list2]

cimbined=Partition[combi,2]

but without any success. I am sure it is easy but ....

Thanks a lot,
Harry

```

• Prev by Date: Programming question
• Next by Date: Why doesn't this rule work?
• Previous by thread: Re: combining lists
• Next by thread: memoizing functions