摘要: 阅读全文
posted @ 2018-06-01 12:50 无所住心 阅读(89) 评论(0) 推荐(0) 编辑
摘要: #生成器,只有在调用时,才会生产相应的数据,不能通过切片取#c.__next__()取下一个。只记住当前的位置,只有一个__next__()方法。import timedef consumer(name): print("%s 准备吃包子啦!" %name) while True: baozi = 阅读全文
posted @ 2018-06-01 12:49 无所住心 阅读(132) 评论(0) 推荐(0) 编辑