1、
>>> def a(): print("hello world!") >>> a <function a at 0x000002CE49DCB550> >>> a() hello world!
2、
>>> def a(): print("hello world!") def b(): print("xxxxxx!") return b >>> a() hello world! <function a.<locals>.b at 0x0000020074A8F040> >>> a()() hello world! xxxxxx!
3、
>>> def a(): print("hello world!") def b(): print("xxxxxx!") return b() >>> a() hello world! xxxxxx!
小括号的作用表示执行函数。