#熬最

熬最深的夜喝最劣的酒————浅谈生成器(generator)

测试(test)defs():print("stup1")n="第一步"yieldn#类似于return但是又不同于赖克宝,剁一下,跳一下print("stup2")yield2print("stup3")yield3print("stup4")yield4#raiseStopIteration#抛出异常f=s()pr...