<分区> 分区>
我一直在尝试在变量中返回函数中的变量并在其外部使用它:
test = 0
def testing():
test = 1
return test
testing()
print(test)
但是当我运行它时,结果是0。我该如何解决这个问题?
<分区> 分区>
我一直在尝试在变量中返回函数中的变量并在其外部使用它:
test = 0
def testing():
test = 1
return test
testing()
print(test)
但是当我运行它时,结果是0。我该如何解决这个问题?