Python globals() function

The globals() function in Python returns the value of the named attribute of object where the ‘name’ must be a string.

Syntax

Parameter

NA

Return

This function returns the global symbol table as a dictionary.

Example 1

Output

Pin It on Pinterest

Share This