What do you mean by globals() and locals () functions.
Answer:
The globals( ) and locals( ) functions can be used to return the names in the global and local namespaces depending on the location from where they are called.
If the locals( ) function is called from within a function, it will return the names of all the variables that can be accessed locally from that function.
If the globals( ) function is called from within a function , it will return the names of all the variables that can be accessed globally from that function.