Python 函数与Lambda表达式
#函数
##5. 函数
- 传递
- 匹配
- 位置匹配
- 关键字匹配
- 默认值(调用调用省略的值)
ef func(a,b=2,c=3):
print(a, b, c)
func(1,2,3)
func('a','b','c')
func([1,2,3],(5,6),{
'a':1,'b':2})
func(1, c=5)
#example 2
def average_score(score1,score2):
return (score1 + score2) / 2
result = average_score(