python生成器 # -*- coding:UTF-8 -*- def create_num(all_num): #a = 0 #b = 1 a, b = 0, 1 current_num = 0 while current_num < all_num: #print(a) yield a <