摘要:
''' 迭代器和生成器的结合实例 生成器只有在调用的时候才会生成相应的数据 ''' import time #吃包子 def consumer(name): print("%s 准备开始吃包子啦!" % (name)) while True: baozi = yield print("一半包子[%s]被[%s]吃掉啦" % (baozi, name)) #做包子 def pro... 阅读全文
posted @ 2018-04-03 08:23
与君同悦
阅读(117)
评论(0)
推荐(0)

浙公网安备 33010602011771号