New course! Every coder should learn Generative AI!
Try a free lesson0
Global variable in python
1 Answer
+ 4
What is your question?
In case you are trying to use the global x inside of the function, you need to specify
global x
in the beginning of the function.