售前咨询:400-0666-318
在python中使用del关键字声明多个函数,具体方法如下:
def f():global xx = 2print xx +=2 def g():global xprint xx += 3f()g()print x
def f():
global x
x = 2
print x
x +=2
def g():
x += 3
f()
g()
辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读: python调用模块的方法有哪些