def createCounter():
x = 0
def counter():
nonlocal x
x = x+1
return x
return counter
Sign in to make a reply
Coal and gas outburst 💨
def createCounter():
x = 0
def counter():
nonlocal x
x = x+1
return x
return counter