Re: Concatenating dictionary values and keys, and further operations

2006-06-07 Thread Roberto Bonvallet
Girish said, through Gerard's forwarded message: > >Thanks a lot Gerard and Roberto.but i think i should explain the exact > >thing with an example. > >Roberto what i have right now is concatenating the keys and the > >corresponding values: > >e.g {'a':[1,2],'b':[3,4,5],'c':[6,7]} should give me >

Re: Concatenating dictionary values and keys, and further operations

2006-06-05 Thread Gerard Flanagan
Girish Sahani wrote: > Gerard Flanagan wrote: >> Girish Sahani wrote: >> > I wrote the following code to concatenate every 2 keys of a dictionary >> and >> > their corresponding values. >> > e.g if i have tiDict1 = tiDict1 = {'a':[1,2],'b':[3,4,5]} i should get >> > tiDict2={'ab':[1,2][3,4,5]} and

Re: Concatenating dictionary values and keys, and further operations

2006-06-05 Thread Gerard Flanagan
Gerard Flanagan wrote: > Girish Sahani wrote: > > I wrote the following code to concatenate every 2 keys of a dictionary and > > their corresponding values. > > e.g if i have tiDict1 = tiDict1 = {'a':[1,2],'b':[3,4,5]} i should get > > tiDict2={'ab':[1,2][3,4,5]} and similarly for dicts with large

Re: Concatenating dictionary values and keys, and further operations

2006-06-05 Thread Gerard Flanagan
Girish Sahani wrote: > I wrote the following code to concatenate every 2 keys of a dictionary and > their corresponding values. > e.g if i have tiDict1 = tiDict1 = {'a':[1,2],'b':[3,4,5]} i should get > tiDict2={'ab':[1,2][3,4,5]} and similarly for dicts with larger no. of > features. > Now i want

Re: Concatenating dictionary values and keys, and further operations

2006-06-05 Thread Roberto Bonvallet
Girish Sahani <[EMAIL PROTECTED]>: > I wrote the following code to concatenate every 2 keys of a dictionary and > their corresponding values. > e.g if i have tiDict1 = tiDict1 = {'a':[1,2],'b':[3,4,5]} i should get > tiDict2={'ab':[1,2][3,4,5]} and similarly for dicts with larger no. of > features.

Concatenating dictionary values and keys, and further operations

2006-06-05 Thread Girish Sahani
I wrote the following code to concatenate every 2 keys of a dictionary and their corresponding values. e.g if i have tiDict1 = tiDict1 = {'a':[1,2],'b':[3,4,5]} i should get tiDict2={'ab':[1,2][3,4,5]} and similarly for dicts with larger no. of features. Now i want to check each pair to see if they