python-生成器的应用
1.实现多任务import timedef task_1(): while True: print('-----1-------') time.sleep(0.1) yielddef task_2(): while True: print('-------2---------') time.s...