MathGroup Archive 2005

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

Search the Archive

Re: enumerating list items

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56016] Re: [mg55976] enumerating list items
  • From: Chris Chiasson <chris.chiasson at gmail.com>
  • Date: Wed, 13 Apr 2005 01:11:04 -0400 (EDT)
  • References: <200504120926.FAA27688@smc.vnet.net>
  • Reply-to: Chris Chiasson <chris.chiasson at gmail.com>
  • Sender: owner-wri-mathgroup at wolfram.com

a={id,gender,status,odag}
b=Range@Length@a
MapThread[Set,{a,b}]
{id,odag,gender,status}

On Apr 12, 2005 5:26 AM, Søren Merser <merser at image.dk> wrote:
> hi
> 
> is there a way to make each item in the list 'assignable', i.e. i want to
> enumerate the items like id=1, gender=2 etc.
> 
> a={"id", "gender", "status", "odag"}
> 
> b=Range@Length@a
> 
> a=b
> 
> regards soren
> 
> 


-- 
Chris Chiasson
Kettering University
Mechanical Engineering
Graduate Student
1 810 265 3161


  • Prev by Date: Re: enumerating list items
  • Next by Date: Output format
  • Previous by thread: enumerating list items
  • Next by thread: Re: enumerating list items