Re: List Manipulation
- To: mathgroup@smc.vnet.net
- Subject: [mg10549] Re: List Manipulation
- From: Allan Hayes <hay@haystack.demon.co.uk>
- Date: Tue, 20 Jan 1998 16:53:53 -0500
- References: <69nbfq$89h@smc.vnet.net>
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
>
> --
> * *
> * *
> /\ */\*
> / \ / \ /\
Paul:
lst = Table[Random[], {7},{2}]
{{0.234175,0.759186},{0.204252,0.729903},{0.325512,0.0396457},{0.872985,
0.291478},{0.842928,0.970129},{0.550634,0.634746},{0.0596751,0.454021}}
Partition[lst, 1,2, Sequence]
{{0.234175,0.759186},{0.325512,0.0396457},{0.842928,0.970129},
{0.0596751, 0.454021}}
--
Allan Hayes
Training and Consulting
Leicester, UK
hay@haystack.demon.co.uk
http://www.haystack.demon.co.uk
voice: +44 (0)116 271 4198
fax: +44 (0)116 271 8642