MathGroup Archive 2012

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

Search the Archive

Re: case of inconsistent API between Drop and Part?


On 6/30/2012 11:20 PM, Bob Hanlon wrote:
> To drop elements 2 and 4 in one command:
>
> lis = {a, b, c, d, e};
>
> Drop[lis, {2, 4, 2}]
>
> {a, c, e}
>
>

I knew someone will say that :)

But that is clearly not what I am asking, as it is not
a general solution. It is using a special case of

"Drop[list,{m,n,s}]
gives list with elements m through n in steps of s dropped"

which is clearly not a general solution. I happend to have
asked using an example which allows this in this one case only.

Ok, here is the question again:

Use one call to Drop to remove only elements

       2,3,7,11, and 12

from

lis={q,w,e,r,t,y,u,i,o,p,a,s,d,f,g,h,j,k,l,z,x,c,v,b,n,m}

regards,
--Nasser



  • Prev by Date: Solid modeling using Manipulate
  • Next by Date: Re: Higher precision in Error function Erf[] needed.
  • Previous by thread: Re: case of inconsistent API between Drop and Part?
  • Next by thread: Re: case of inconsistent API between Drop and Part?