python variable scope, function inputs necessary?

后端 未结 0 483
失恋的感觉
失恋的感觉 2021-01-17 07:10

Several questions regarding when function inputs are necessary. Ex.

run():
    print(x)

if __name__ == "__main__":
    x = 5
    run()


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