def createCounter():
def count():
n = 0
while True:
n += 1
yield n
c = count()
def counter():
return next(c)
return counter
Sign in to make a reply
其实一分钟只有59秒
def createCounter():
def count():
n = 0
while True:
n += 1
yield n
c = count()
def counter():
return next(c)
return counter