MathGroup Archive 2005

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

Search the Archive

Re: delete something from a complex list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58086] Re: [mg58075] delete something from a complex list
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 17 Jun 2005 07:09:34 -0400 (EDT)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

{{{{1,3,2,4}},{{5,2}}},{{4,2},{6,1,7}}}//.
  {s___,x_?(#==1||#==2&),f___}:>{s,f}

{{{{3, 4}}, {{5}}}, {{4}, {6, 7}}}


Bob Hanlon

> 
> From: mark <rotree2003 at yahoo.com>
To: mathgroup at smc.vnet.net
> Date: 2005/06/17 Fri AM 05:20:41 EDT
> Subject: [mg58086] [mg58075] delete something from a  complex  list
> 
> 
> hi
> how to delete numbers 1 and 2 from the multilevel nested list, while 
preserving the structure:
> {{{{1,3,2,4}},{{5,2}}},{{4,2},{6,1,7}}}
> i hope the result is:
> {{{{3,4}},{{5}}},{{4},{6,7}}}
> i have tried delete with no success but after i have flatten the list.
> thanks
>  
> 
> 


  • Prev by Date: Re: delete something from a complex list
  • Next by Date: Re: For Loop and Array related
  • Previous by thread: Re: delete something from a complex list
  • Next by thread: Re: delete something from a complex list