On 20 Nov 2005 02:59:30 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > b = dict([(x,dict()) for x in a]) > Shi Mu wrote: > > I have have the following code: > > >>> a=[3,5,8,0] > > >>> b={} > > >>> > > How I can i assign each item in a as the key in the dictionary b > > simultaneously? > > that is, > > b={3:[],5:[],8:[],0:[]} > > Thanks! Thanks!!! -- http://mail.python.org/mailman/listinfo/python-list
- Re: about dictionary Shi Mu
- Re: about dictionary Ben Finney
- Re: about dictionary przemek drochomirecki
- Re: about dictionary Peter Otten
- Re: about dictionary Shi Mu
- Re: about dictionary Peter Otten
- Re: about dictionary przemek drochomirecki
- Re: about dictionary Shi Mu
- Re: about dictionary przemek drochomirecki
- about dictionary Shi Mu
- Re: about dictionary Bengt Richter