Discuss / Python / 作业

作业

Topic source

def createCounter():

    x=0

    def counter():

        nonlocal x

        x+=1

        return x

    return counter


  • 1

Reply