2020年6月14日
摘要: class Fib(object): def __init__(self): self.a, self.b = 0, 1 # 初始化两个计数器a,b def __iter__(self): return self # 实例本身就是迭代对象,故返回自己 def __next__(self): self 阅读全文
posted @ 2020-06-14 08:02 jvincent 阅读(386) 评论(0) 推荐(0) 编辑