i = 0
def myFun():
global i
i=i +1
return i
myFun()
==========================
accumulate( )
total = 0
def accumulate():
global total
total += 1
return total
时间: 2024-10-01 00:03:36
i = 0
def myFun():
global i
i=i +1
return i
myFun()
==========================
accumulate( )
total = 0
def accumulate():
global total
total += 1
return total