how to access python local variables in outside the function without calling the function

后端 未结 0 1668
鱼传尺愫
鱼传尺愫 2020-12-03 04:51

How can I use local variables outside the function without calling the function in Python?

for example:

def a(): x = input(\'name: \')

print(name)

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