函数里面写函数

函数里面写函数,在函数之外无法调用

def fun():
    def f():
        print("*******")
    def f2():
        print("!!!!!!!")
    f()
    f2()


fun()

*******
!!!!!!!

posted @ 2022-07-01 15:39  半日闲1  阅读(57)  评论(0编辑  收藏  举报