# 生成器
n = (i for i in range(0,10000))
print(n)
def gen(max):
n = 0
while n <= max:
n +=1
yield n
g = gen(10000)
for i in g:
print(i)
# 生成器
n = (i for i in range(0,10000))
print(n)
def gen(max):
n = 0
while n <= max:
n +=1
yield n
g = gen(10000)
for i in g:
print(i)