RE: List Manipulation
- To: mathgroup@smc.vnet.net
- Subject: [mg10535] RE: [mg10471] List Manipulation
- From: "Barthelet, Luc" <lucb@ea.com>
- Date: Tue, 20 Jan 1998 02:23:21 -0500
If your list of lists is call Mlist, you can get the new list with just
the odd ones by doing:
In[1]:= MList = {1,2,3,4,5,6,7,8};
First /@ Partition[ MList,2]
Out[1]= {1,3,5,7}
good luck!
Luc Barthelet
>-----Original Message-----
>From: Paul.Hanson@colorado.edu [SMTP:Paul.Hanson@colorado.edu]
To: mathgroup@smc.vnet.net
>Sent: Friday, January 16, 1998 1:35 AM
>To: mathgroup@smc.vnet.net
>Subject: [mg10471] List Manipulation
>
>Hola!
> Hope you're all doing well. If I have a list of n lists, and want to
>get rid of all the even ones how would I go about doing this? That
>is, {{n1},{n2},.....{2n}} converted to {{n1},{n3}...{2n-1}}. I tried
>using the various procedures in Wolfram's book, but nothing seems to
>work (ie, Delete, Take, etc.). Thanks for the help.
>
>Paul Hanson
>
>--
> * *
> * *
> /\ */\*
> / \ / \ /\
>