python-装饰器2

python-装饰器2

1.函数既“变量

def bar():
    print("in the bar")
def foo():
    print("in the  foo")
    bar()
foo()   



def foo():
     print("in the  foo")
     bar()
foo()
def bar():
  print("in the bar")
foo()

匿名函数
niming=lambda x:x*5
print(niming(3))

posted @ 2019-12-04 01:54  科子  阅读(133)  评论(0编辑  收藏  举报