Re: lists
- To: mathgroup@smc.vnet.net
- Subject: [mg10557] Re: [mg10479] lists
- From: seanross@worldnet.att.net
- Date: Tue, 20 Jan 1998 16:54:00 -0500
- References: <199801160935.EAA08315@smc.vnet.net.>
Paul.Hanson@colorado.edu wrote:
>
> Hola!
> So, if you have a couple of lists:
> {{1},{2},{3},{4}....{n}}
> and
> {{1a},....{na}}
> and I want to combine them such that,
> {{1},{1a},{2},{2a}....{n},{na}}
>
> How do I get there? Thanks in advance for the help.
>
> Paul Hanson
>
> --
> * *
> * *
> /\ */\*
> / \ / \ /\
maybe this will help. I used row instead of column vectors, but I think
the technique is general.
list1={1,2,3,4,5};
list2={a,b,c,d,e};
In[3]:=
Flatten[Transpose[{list1,list2}]]
Out[3]=
{1,a,2,b,3,c,4,d,5,e}
--
Remove the _nospam_ in the return address to respond.
- References:
- lists
- From: Paul.Hanson@colorado.edu
- lists