Simple account program

Greg Ewing greg at
Tue Mar 22 04:28:45 CET 2005

Igorati wrote:
> pickle.dump ((withdrawl), file ('account.pickle', 'w'))

Is this banking done with an American accent? :-)

> pickle.dump ((deposit), file ('account.pickle', 'w'))
> Am I on the right track?

The file you create in the second statement is going
to overwrite the first one. If you want to append
data to an existing file, you need to open it in
'a' mode.

Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand

More information about the Python-list mailing list