Re: List Manipulation
- To: mathgroup at smc.vnet.net
- Subject: [mg63488] Re: List Manipulation
- From: "Jean-Marc Gulliet" <jeanmarc.gulliet at gmail.com>
- Date: Tue, 3 Jan 2006 01:24:40 -0500 (EST)
- Organization: The Open University, Milton Keynes, U.K.
- References: <dpb0t5$2j3$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"LectorZ" <lectorz at mail.ru> a écrit dans le message de news:
dpb0t5$2j3$1 at smc.vnet.net...
| Hi guys,
|
| One simple question to list manipulation.
|
| I have 2 lists
|
| list1 = {{a,b,c,d},{e,f,g,h}}
| list2 = {{1},{2}}
|
| Which function(s) should I use to get
|
| list3 = {{a,b,c,d,1},{e,f,g,h,2}}
|
| Thanx in advance
|
| LZ
|
Hi Lector,
In[1]:=
list1 = {{a, b, c, d}, {e, f, g, h}};
list2 = {{1}, {2}};
list3 = MapThread[Append, {list1, Flatten[list2]}]
Out[3]=
{{a, b, c, d, 1}, {e, f, g, h, 2}}
Happy New Year!
/J.M.