PYTHON Study Guide - Local Variable, Global Variable
Document Summary
#36 python tutorial for beginners | global variable in python | global variable vs local variable. Section overview: in this document, the speaker discusses the concept of scope in python functions and variables. They explain how to create local and global variables, how to access them within functions, and what happens when you try to change a global variable from within a function. Variables can be created inside or outside of functions. The concept of scope refers to where a variable can be accessed in your code. Local variables are defined inside a function and can only be accessed within that function. Global variables are defined outside of any function and can be accessed anywhere in your code. You cannot access local variables outside of the function they were defined in. Global variables can be accessed from anywhere in your code, including within functions.