image
image
image

Variable Scope

image

Even though there might be several unique namespaces specified, it may not be possible to access all of the namespaces given because of scope. The concept of scope refers to a segment of the program from where we access the namespace directly without any prefix. The following are the scope types:

i.  Scope containing local names, current function.

ii.  Scope containing global names, the scope of the module.

iii.  Scope containing built-in names of the outermost scope.