The globals( ) and locals( ) Functions
Learn about the usage of built-in functions globals( ) and locals( ).
We'll cover the following...
A dictionary of identifiers in global and local namespaces can be obtained using the built-in functions globals()
and locals()
.
If locals()
is called from within a function/method, it returns a
dictionary of identifiers that are accessible ...