MathGroup Archive 2000

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

Search the Archive

Re: Making Big Substitution List


Alex,
    No, not Apply, but Thread[Rule,....]:

lst1={a,b,c};
lst2={1,2,3};
Thread[Rule,lst1,lst2]

Out>>
{a -> 1, b -> 2, c -> 3}

-mark harder


-----Original Message-----
From: Alex <alex000 at my-deja.com>
To: mathgroup at smc.vnet.net
Subject: [mg25639] [mg25597] Making Big Substitution List


>Hi All,
>
>I have the following list
>P={p1,p2,p3}
>and I would like to create substitution list
>SubsP={p1->1,p2->2,p3->3}
>to use for the future
>
>How do I do it in one nice expression.
>Unfortunately P->{1,2,3} does not
>do the job.
>I am think about somthing like
>Apply[] function but I am lost ...
>
>Please help
>
>Many thanks,
>
>Alex
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
>
>



  • Prev by Date: How to Import Numbers with + in the Exponential?
  • Next by Date: strange problem about colors
  • Previous by thread: Re: Making Big Substitution List
  • Next by thread: RE: Making Big Substitution List