[BangPypers] help needed with dictionary

Noufal Ibrahim noufal at gmail.com
Fri Aug 29 11:50:36 CEST 2008


On Fri, Aug 29, 2008 at 2:32 PM, sunny_plone <san82moon at gmail.com> wrote:
>
>  hi all,
> i am a newbie in python.  i was trying to work with dictionaries.  i wanted
> to input values  through command line and store the values in a dictionary.
> i mean for the same key , multiple values. can any1 suggest me how can i do
> it.....thank you....

I'm not sure what your code is trying to do but this kind of thing is
usually done like this.

kev = dict()
kev.setdefault("Name",[])
kev["Name"].append(person_name)


-- 
~noufal


More information about the BangPypers mailing list