author:headsen  chen

date: 2018-03-21  17:42:13

notice:This  article created by headsen chen himself and not allowed to copy,or you will count law question and to  pay 10000$!!! 

 

1,直接调用函数名的执行:

python中的函数的执行分类

 

2,在return中的执行:

python中的函数的执行分类

执行结果如下:

python中的函数的执行分类

 

3,在print里面执行1:不带参数的单一函数执行:print(f())

python中的函数的执行分类

结果如下:

python中的函数的执行分类

 

4,在print里面执行2:带参数的高阶函数:print(f(a))

python中的函数的执行分类

结果如下:

python中的函数的执行分类

 

5,赋值执行1:不带参数的函数赋值执行:b =f()

python中的函数的执行分类

执行结果:

python中的函数的执行分类

 

6,赋值执行2:带参数的赋值执行:b=f(a)

 python中的函数的执行分类python中的函数的执行分类

执行结果如下:

python中的函数的执行分类

 

相关文章:

  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2021-05-22
  • 2021-05-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案