摘要:
1. 匿名函数 1.1 有名函数 有名函数:定义了一个函数名,函数名指向内存地址;通过函数名进行访问。函数名加括号就可以运行有名函数,例如:func() def func(x, y, z = 1): return x + y + z print(func(1,5,2)) 1.2 匿名函数 匿名函数: 阅读全文
摘要:
1. 函数嵌套 1.1 函数嵌套调用 函数的嵌套调用:在调用一个函数的过程中,又调用了其他函数 def bar(): print("from in the bar.") def foo(): print("from in the foo.") bar() foo() 1.2 求函数最大值 def m 阅读全文