JNCIA-DevOps: Juniper Networks Certified Associate – Automation and DevOps — Question 1

Which statement is correct about Python variables once they are created?

Answer options

Correct answer: A

Explanation

The correct answer is A because a global variable can only be accessed by functions that are defined after it in the code. Options B and C are incorrect as they imply unrestricted access to all variables, while D is wrong since a global variable is accessible to all functions, not just the one that created it.