MathGroup Archive 2012

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

Search the Archive

Re: addRule


In[1]:= Thread /@ Apply[Rule, {{1, {38, 35, 37}}, {2, {21}}, {3, {24,
14}}}, {1}]
Out[1]= {{1 -> 38, 1 -> 35, 1 -> 37}, {2 -> 21}, {3 -> 24, 3 -> 14}}


Adriano Pascoletti

2012/4/4 clansa <dauphinester at gmail.com>

> Hello,
> I have these data
> {{1, {38, 35, 37}}, {2, {21}}, {3, {24, 14}}}
> and I want
> {[1->38,1->35,1->37},{2->21},{3->24,3->14}}
> The solution is simple when list of data have the same length
> But what is the solution for my example
> Thanks
>
> Andrew
>
>



  • Prev by Date: Re: Printing Notebooks without Input/Output cells
  • Next by Date: Re: addRule
  • Previous by thread: Re: addRule
  • Next by thread: Re: addRule