Re: writing dictionaries to a file

2007-03-21 Thread Josh Bloom
Where have you defined the relationship between the 2 dictionaries? If you know that all the someys are related to the somex you can do something like this: somex = {'unit':'00', 'type':'processing'} somey1 = {'comment':'fair', 'code':'aaa'} somey2 = {'comment':'fair', 'code':'bbb'} somey3 = {'

writing dictionaries to a file

2007-03-21 Thread kavitha thankaian
Hi All, I have two dictionaries: somex:{'unit':00, type:'processing'} somey:{'comment':'fair', 'code':'aaa'} somey:{'comment':'good', 'code':bbb'} somey:{'comment':'excellent', 'code':'ccc'} now i would like to write this to a file in the following format(unit, code