直接看个例子吧
1 def hello_python(): 2 print("python3.x") 3 def three_hello(): 4 for i in range(3): 5 hello_python() #回调hello_python函数 6 if __name__ == "__main__": 7 three_hello()
执行结果:
python3.x python3.x python3.x