摘要: 通过继承解决代码重用的问题 Queue队列 : 先进先出. class Queue: def __init__(self): self.l = [] def put(self,item): self.l.append(item) def get(self): return self.l.pop(0) 阅读全文
posted @ 2020-07-28 16:04 qqq789001 阅读(179) 评论(0) 推荐(0)
摘要: 一。Pickle与对象的保存 class Course: def __init__(self,name,period,price): self.name = name self.period = period self.price = price # python = Course('python' 阅读全文
posted @ 2020-07-28 14:38 qqq789001 阅读(100) 评论(0) 推荐(0)