+ 1
What is global keyword
3 Answers
+ 5
Please specify the language in your question tags to improve context clarity đ
+ 2
the keyword âglobalâ is used with a variable declaration in some languages, and makes the variable available in the entire code.
+ 2
In Python global keyword is used in code blocks of functions (or classes) to prevent variables that are defined in functions to be automatically destroyed.
In code blocks of classes, instead of being destroyed the variables would only becomr available with the namespace of the class.