摘要:
day23 函数对象 函数可以被赋值def foo(): print('from foo')def func(f): f()func(foo)函数可以当做函数的返回值函数可以当做容器的元素# def foo():# print(234567,1234,2345)# l=[foo]# l[0]( 阅读全文
posted @ 2021-06-30 19:44
SSSagittarius
阅读(45)
评论(0)
推荐(0)
摘要:
day22 1.函数的基本使用 1.函数的使用原则:先定义,后调用 2.定义函数的三种格式: def foo(): #无参函数 print('hello') def foo(x,y): #有参函数 res = x + y def spam(): #空函数 pass 3.函数的返回值 def foo( 阅读全文
posted @ 2021-06-30 19:42
SSSagittarius
阅读(83)
评论(0)
推荐(0)

浙公网安备 33010602011771号