def createCounter(): def count1(): n=0 while True: n+=1 yield n x=count1() def counter(): return next(x) return counter
Sign in to make a reply
黑脸_龙先森
def createCounter(): def count1(): n=0 while True: n+=1 yield n x=count1() def counter(): return next(x) return counter