python 中的nonlocal

python 中nonloal 关键字用来在函数或其他作用域中使用外层变量(非全局),也可使用global需要在函数外部

 

posted @ 2021-05-16 20:25  简直😓  阅读(225)  评论(0编辑  收藏  举报