执行以下代码的结果是? import pickle class account: def __init__(self, id, balance): self.id = id self.balance = balance def deposit(self, amount): self.balance += amount def withdraw(self, amount): self.balance -= amount myac = account('100', 100) myac.deposit(800) myac.withdraw(500) fd = open('archive', 'wb' ) pickle.dump(myac, fd) fd.close() myac.deposit(200) fd = open( 'archive', 'rb') myac = pickle.load( fd ) fd.close() print (myac.balance)
发布于 2021-11-03 14:31:28
登录后免费查看答案
关注者
0
被浏览
183
1 个回答