首页 > 代码库 > Python入门系列教程(五)函数

Python入门系列教程(五)函数

全局变量

修改全局变量

a=100def test():    global  a    a=200    print a

多个返回值

技术分享

缺省参数

def test3(a,b=1):    print  a,btest3(a)test3(a,b=2)

不定长参数

技术分享

 

Python入门系列教程(五)函数