函数里面写函数

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

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


fun()

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

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