def createCounter(): n = 0 def counter(): nonlocal n n = n + 1 return n return counter
def createCounter(): s = [0] def counter(): s[0] = s[0] + 1 return s[0] return counter
Sign in to make a reply
用户6589242306