def createCounter(): n=0 def counter(): nonlocal n n+=1 return n return counter
Sign in to make a reply
Vincent_胡小金