python - function 10, nesting of functions

Add one or more layers of functions to a function

def f1():                  # todo pay attention to the indentation of the code 
    def f2():
         def f3():
             print ( ' c ' )
        f3()
        print('b')
    f2()
    print('a')
f1 ()
View Code

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324655624&siteId=291194637