> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Fredrik Lundh > Sent: Wednesday, January 09, 2008 2:39 PM > To: python-list@python.org > Subject: Re: problem of converting a list to dict > > [EMAIL PROTECTED] wrote: > > >> to see what's going on on your machine, try printing "a" after the > >> split, but before you use it to populate the dictionary. > > > > 'print a' works > > so what does it tell you? >
A bigger hint: a=i.split('=') print "'%s' splits into " % (i), a assert len(a) == 2 mydict[a[0]]=a[1] -- http://mail.python.org/mailman/listinfo/python-list