Discuss / Python / OVO

IrisBlume

#1 Created at ... [Delete] [Delete and Lock User]
def create_counter():    def num(i=0):        while True:            i = i + 1            yield i      it = num()    def counter():        return next(it)    return counterff = create_counter()print(ff(), ff(), ff())

  • 1

Reply