我在这做错了什么?
counter = 0 def increment(): counter += 1 increment()
上面的代码抛出了一个UnboundLocalError.
UnboundLocalError
python scope global-variables
global-variables ×1
python ×1
scope ×1