摘要:
def foo(): print'foo' foo//表示是函数 打印内存地址 foo()//表示执行foo函数 def foo(): print'foo' foo=lambda x:x+1 foo()//执行下面的lambda表达式,而不是原来的f def login(func): //func= 阅读全文
摘要:
import time def consumer(name): print("%s 准备 吃包子“%name) while Ture: baozi=yield send 传的i print("包子[%s]来了,被[%s]吃了!"%(baozi,name)) def producer(name) c= 阅读全文