writing dictionary to file
kavitha thankaian
kavithapython at yahoo.co.in
Thu Mar 8 08:10:14 EST 2007
Hi,
I have 'n' number of dictionaries with the same name but different values
( DorC means debit or credit)
some={'DorC':'D', 'amount':200,'name':'xxx'}
some={'DorC':'C', 'amount':200,'name':'xxx'}
some={'DorC':'D', 'amount':300,'name':'yyy'}
some={'DorC':'C', 'amount':500,'name':'yyy'}
some={'DorC':'D', 'amount':700,'name':zzz}
some={'DorC':'C', 'amount':900,'name':zzz} and so on,,,
if the credit and debit is not equal for a person, then i would like to open a file and write it in the following format:
name:yyy
debit:300
credit:500
name:zzz
debit:700
credit:900
can anyone help me???
kavitha
---------------------------------
Heres a new way to find what you're looking for - Yahoo! Answers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070308/1ddf3128/attachment.html>
More information about the Python-list
mailing list