how to find position of dictionary values

lee san82moon at gmail.com
Mon Sep 1 07:26:14 EDT 2008


On Sep 1, 3:59 pm, Wojtek Walczak <gmin... at bzt.bzt> wrote:
> On Mon, 1 Sep 2008 03:51:13 -0700 (PDT), lee wrote:
> > i am soory for that keystrokes. can anyone tell me how can i change
> > the value of key.
> > suppose i have a dictionary
>
> > kev =  {'kabir': ['ka... at kabir.com', '1234', 'missuri'], 'shri':
> > ['s... at shri.com', '23423', 'india'], 'marsa': ['ma... at marsa.com',
> > '2345', 'brazil'], 'sandeep': ['sand... at sandeep.com', '007',
> > 'canada']}
> > how can i change the key to something like 'sabir' and
>
> kev['sabir'] = kev['kabir']
> del kev['kabir']
>
> > how can i
> > change the values of kabir?
>
> kev['sabir'][0] = 'sa... at sabir.com'
>
> *untested*
>
> --
> Regards,
> Wojtek Walczak,http://tosh.pl/gminick/

thanks wojtek, it worked   :)



More information about the Python-list mailing list