In Python's scoping architecture, global variables are identifiers that are declared outside of all function and class definitions—specifically at the top level or module level of a .py file. Because they reside within the module's global namespace, they can be read by any nested code blocks, functions, or subroutines within that module. Variables defined inside a function belong to the local namespace unless explicitly elevated using the global declaration keyword inside the function body; however, the variables themselves are defined globally by virtue of their module-level placement. Enclosing variable names in quotes creates string literals, not variables. Therefore, global variables are precisely defined as variables instantiated at the module level.
[Reference: JNCIA-DevOps Study Guide — Python Fundamentals: Global vs Local Scope and Execution Context., ]
JN0-224 PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 75% Discount on All Products,
Use Coupon: "ac75sure"