MathGroup Archive 2007

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

Search the Archive

Re: Iterate through a list help

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77352] Re: Iterate through a list help
  • From: chuck009 <dmilioto at comcast.com>
  • Date: Thu, 7 Jun 2007 03:48:48 -0400 (EDT)

Just pick out the first element in each sub-list:

In[3]:=
list={{1,2,3},{4,5,6},{9,3,12}};

newlist=First /@ list

Out[4]=
{1,4,9}


  • Prev by Date: Re: comments
  • Next by Date: Re: Version 6.0 Problems
  • Previous by thread: Re: Iterate through a list help
  • Next by thread: modify elements of arb.dimensionality matrices