Hi,
I want to be able to add multiple new values to a key in a dictionary.
I have tried the following:
sec_dict_clean=
{88: [87, 89, 78, 98], 58: [57, 59, 48, 68], 69: [79], 95: [94, 96, 85]}
for i in range(len(sec_dict_clean.values())):
for j in range(len(sec_dict_clean.values()[i])):
Nevermind,
got it.
Sorry.
>>> Krishna Pacifici 08/11/09 2:12 PM >>>
Hi,
I want to append the values of a dictionary to a list. I have a dictionary
sec_dict_clean and I want to append the values to a list, but am having a hard
time looping through the values in the diction
nd am enjoying all of
the flexibility associated with a scripting and programming language.
Thanks again,
Krishna
>>> Simon Forman 08/11/09 12:15 PM >>>
On Aug 11, 11:51 am, MRAB wrote:
> Krishna Pacifici wrote:
> > Thanks for the help.
>
> > Actually this is
suggestions or comments about the
above problem would be greatly appreciated.
Thanks again,
Krishna
>>> Dave Angel 08/11/09 7:38 AM >>>
Krishna Pacifici wrote:
> Hi,
> kind of a newbie here, but I have two questions that are probably pretty
> simple.
>
> 1. I ne
Hi,
kind of a newbie here, but I have two questions that are probably pretty simple.
1. I need to get rid of duplicate values that are associated with different
keys in a dictionary. For example I have the following code.
s={}
s[0]=[10,2,3]
s[10]=[22,23,24]
s[20]=[45,5]
s[30]=[2,4]
s[40]=[6,7