- total = 0
- def accumulate(increment):
- global total
- if total:
- total += increment
- else:
- total = increment
- return total
- total=0
- def fun(a):
- global total
- total=a+total
- return total
|
楼主: 741311791
|
2003
3
[问答] 一个自增的小程序,两种写法,但不知道有啥区别 |
|
大专生 38%
-
|
| ||
|
|
加好友,备注cda京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明


