- Global Variables: Variables declared outside a function or in a global space are called global variables. These variables can be accessed by any function in the program.
- Local Variables: Any variable declared inside a function is known as a local variable. This variable is present in the local space and not in the global space.
Shathana. S.R. Answered question July 7, 2023
Python Global variables are those which are not defined inside any function and have a global scope whereas Python local variables are those which are defined inside a function and their scope is limited to that function only.
Shathana. S.R. Answered question July 7, 2023
