函数定义 在 函数调用 之前
而函数定义的顺序无关紧要
就如同变量的定义一般
a = 1b = 2#两者没什么不同b = 2a = 1
例
def bbb(): print('this is b') aaa()def aaa(): print('this is a')bbb()#--------->this is bthis is a
def aaa(): print('this is a')def bbb(): print('this is b') aaa()bbb()#----------->this is bthis is a
不可以这样
def bbb(): print('this is b') aaa()bbb()def aaa(): print('this is a')#--------->Traceback (most recent call last):this is b File "E:/pycharm/TEST.py", line 600, inbbb() File "E:/pycharm/TEST.py", line 599, in bbb aaa()NameError: name 'aaa' is not defined