In this tutorial, you'll learn how to use global variables in python functions using the global keyword or the built-in globals() function. You'll also learn a few strategies to avoid relying on global variables Ò€¦ In python, a global variable is a variable defined outside of any function, making it accessible throughout the entire module or script.

If you create a variable with the same name inside a function, this variable will be local, and can only be used inside the function. The global variable with the same name will remain as it was, global and Ò€¦