Discuss / Python / 打卡

打卡

Topic source

def createCounter():

    n = 0

    def counter():

        nonlocal n

        n=n+1

        return n

    return counter


  • 1

Reply