def f1(n):
m=n
while True:
m+=1
yield m
a=f1(5)
print(a.__next__())
结果:6
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/17099.html
def f1(n):
m=n
while True:
m+=1
yield m
a=f1(5)
print(a.__next__())
结果:6
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/17099.html