What are local variables and global variables in Python?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Please Disable the AdBlocker to Continue to the site.
Local Variables:
The term “local variable” refers to any variable declared inside a function. This variable only exists in local space; it does not exist in global space.
Global Variables:
Global variables are those that are declared outside of a function or in a global space. By any function in the program, these variables are accessible.