python之协程--最简单的代码
摘要:
# Author: xueyou import time def consumer(name): print("%s 准备吃包子啦!" %name) while True: baozi = yield print("包子[%s]来了,被[%s]吃了!" %(baozi,name)) # c = consumer("ChenRonghua") # ... 阅读全文
posted @ 2018-03-14 22:57 杨学友 阅读(177) 评论(0) 推荐(0)
浙公网安备 33010602011771号