MathGroup Archive 2003

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

Search the Archive

Re: List Operation ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40215] Re: List Operation ?
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 26 Mar 2003 02:42:09 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <b5qct7$blp$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,


a)

  list1 /. {a_Symbol,b_,c_,d_,__}:> {a,b,d}

b)
   Append[Take[#, 2], #[[4]]] & /@ list1
  
c)
   Take[Drop[#, {3}], 3] & /@ list1

and several other versions.

Regards
  Jens


Sunil Jayatilleke wrote:
> 
> I have a list as follows
> 
> list1 = {{a1,b1,c1,d1,e1,f1},{a2,b2,c2,d2,e2,f2},{............}.............}
> 
> Now I want to do the following
> 
> list2 ={{a1,b1,d1},{a2,b2,d2}......................}
> 
> How can I do that ?
> 
> thanks
> 
> SJ


  • Prev by Date: Re: List Operation ?
  • Next by Date: Re: proper way to manipulate lists?
  • Previous by thread: Re: List Operation ?
  • Next by thread: Re: List Operation ?