def createCounter(): def func(): n = 1 while True: yield n n = n + 1 num = func() def counter(): return next(num) return counter
Sign in to make a reply
tangdoubley