Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 1
What is global keyword
3 Respostas
+ 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.