全局变量

修改全局变量

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

多个返回值

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

缺省参数

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

test3(a)
test3(a,b=2)

不定长参数

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

 

相关文章:

  • 2022-12-23
  • 2021-12-19
  • 2021-10-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-02-07
  • 2021-11-09
猜你喜欢
  • 2022-12-23
  • 2021-04-10
  • 2021-03-31
  • 2021-12-01
  • 2021-12-12
  • 2022-01-04
相关资源
相似解决方案