Re: List Comparison
- To: mathgroup at smc.vnet.net
- Subject: [mg67160] Re: List Comparison
- From: "dkr" <dkrjeg at adelphia.net>
- Date: Sun, 11 Jun 2006 02:17:23 -0400 (EDT)
- References: <e6e2b7$1uc$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In[17]:= list1={{1,aa,565},{1,bb,566},{1,cc,546},{2,dd,56},{2,ff,56},{2,ss,5}}; list2={{1,aa,34},{1,bb,66},{1,cc,5443},{2,dd,76},{2,ff,87},{2,mm,87}}; In[19]:= {result1,result2,result3}= Reap[Thread[{list1,list2}]/. {{{a_,b_,c_}, {a_,b_,d_}}:> Sow[{a,b,c,d},1],{d_List,e_List}:>{Sow[d,2],Sow[e,3]}}][[2]] Out[19]= {{{1,aa,565,34},{1,bb,566,66},{1,cc,546,5443},{2,dd,56,76},{2,ff,56,87}},{{2, ss,5}},{{2,mm,87}}} dkr