MathGroup Archive 2005

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

Search the Archive

Re: Simple list operation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59444] Re: Simple list operation
  • From: albert <awnl at arcor.de>
  • Date: Wed, 10 Aug 2005 02:55:33 -0400 (EDT)
  • References: <dd9mte$isv$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Steve,

> I have a list of lists like this:
> 
> test = {  {{4, 5}, {5, 9}, {6, 2}},
> {{2, 3},  {3, 5}},
> {{7,1}, {9, 8}, {0, 7}, {2, 8}},
> {{4, 3}, {6, 5}}};
> test // ColumnForm
>               {{{4, 5}, {5, 9}, {6, 2}},
>                 {{2, 3}, {3, 5}},
>                 {{7, 1}, {9, 8}, {0, 7}, {2, 8}},
>                 {{4, 3}, {6, 5}}}
>     
> What I want to do is just remove the last element in each sublist, with
> this result:
> 
>            {{{4, 5}, {5, 9}},
>              {{2, 3}},
>              {{7, 1}, {9, 8}, {0, 7}},
>              {{4, 3}}}

Drop[test,0,-1] should do what you want...

Albert


  • Prev by Date: Re: split list equation
  • Next by Date: Re: split list equation
  • Previous by thread: Re: Simple list operation
  • Next by thread: Re: Simple list operation