def fun(): def fun1(): print (99) fun1() fun() fun1()#总结老男孩python里面讲过,这个是函数的嵌套,很有用, #效果就是给函数一个自己的小函数.然后外面没法调用,这样避免了重名.