Re: writing dictionary to file

2007-03-08 Thread jim-on-linux
On Thursday 08 March 2007 14:40, kavitha thankaian wrote: > Hi Simon, > > iam till here: > > dorc=some['DorC'] > amount=some['amount'] > f=open("logfile.txt", "w") > if dorc =='C': >a = -(amount) > if dorc == 'D': >b = amount >sum=a + b >if sum == 0: >f.writelines

Re: writing dictionary to file

2007-03-08 Thread kavitha thankaian
Hi Simon, iam till here: dorc=some['DorC'] amount=some['amount'] f=open("logfile.txt", "w") if dorc =='C': a = -(amount) if dorc == 'D': b = amount sum=a + b if sum == 0: f.writelines("name:") f.writelines("%s" %some['name']) f.writelines("credit:"