Is it possible to define global variables in a function in Python

前端 未结 2 1235
自闭症患者
自闭症患者 2020-12-08 00:17

How do I declare a global variable in a function in Python?

That is, so that it doesn\'t have to be declared before but can be used outside of the function.

2条回答
提交回复
热议问题