Python locals() function
Published February 16, 2022The locals() function is a built-in Python function that is used to update and return the dictionary of the current local symbol table. In python, a symbol table refers to a data structure containing all the important information concerning the program. This information can include methods, names, classes, etc.
Let's look at the syntax of the locals() function
Syntax
This built-in Python function does not take any input parameter
Locals() |
Example
Let's look at the example below
def localsPython(): |
Output
True |
Article Contributed By :
|
|
|
|
167 Views |