Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: List Manipulation (2) wrote:
> 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}}. 


Here is another way:

lst = {{a},{b,c},{d},{e,f,g},{h,a},{k,l,{m,n}},{o,p,q}};



It's slightly slower than my earlier posting, which used Partition, but
the increased flexibility is valuable.

tst = Table[i, {10000},{i,Random[Integer,100]}];


0.166667 Second


0.183333 Second

Allan Hayes
Mathematica Training and Consulting
Leicester, UK
voice: +44 (0)116 271 4198
fax: +44 (0)116 271 8642

  • Prev by Date: Re: How do I tranfer graphics file via Mathlink
  • Next by Date: Re: Diamond Video card problems?
  • Prev by thread: Backups in Mathematica
  • Next by thread: compiled functions