一个函数里面又调用了另一个函数,这就是所谓的函数嵌套
def testB():
print('-------------1')
print('我再吃饭我是猪')
print('1-------------')
def testA():
print('1234567890')
testB()
print('0987465123')
testA()
运行结果:
如果函数A中调用了函数B,那么会把函数B中的运行完,才会运行函数B
一个函数里面又调用了另一个函数,这就是所谓的函数嵌套
def testB():
print('-------------1')
print('我再吃饭我是猪')
print('1-------------')
def testA():
print('1234567890')
testB()
print('0987465123')
testA()
运行结果:
如果函数A中调用了函数B,那么会把函数B中的运行完,才会运行函数B