2023/04/08 nonlocal
Pythonで
code:main.py
def hoge
num = 0
def count_up
nonlocal num
num += 1
...
関数Aの関数Bから関数Aの変数を使いたい場合はnonlocalを使う