Re: List Manipulation
- To: mathgroup@smc.vnet.net
- Subject: [mg10515] Re: [mg10471] List Manipulation
- From: "C. Woll" <carlw@u.washington.edu>
- Date: Tue, 20 Jan 1998 02:23:03 -0500
Hi Paul,
A simple way to do this problem is to use Partition and First. If
list = {{n1},{n2},...{2n}}
then
First/@Partition[list,2]
should do the trick
Carl Woll
Dept of Physics
U of Washington
On Fri, 16 Jan 1998 Paul.Hanson@colorado.edu wrote:
> 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
>
> --
> * *
> * *
> /\ */\*
> / \ / \ /\
>
>