Python - bound variable scope to closure

前端 未结 0 488
遇见更好的自我
遇见更好的自我 2021-01-11 17:32

I have some function which uses outside variables. A (substantially) simplified example:

a = 2
b = 3

def f(x):
    return x * a + b

While I

相关标签:
回答
  • 消灭零回复
提交回复
热议问题