Python Programming - Functions - Discussion

Discussion Forum : Functions - General Questions (Q.No. 69)
69.
What does the locals() function return?
The local variables in the current namespace.
The global variables in the current namespace.
The names of all variables in the current namespace.
The values of all variables in the current namespace.
Answer: Option
Explanation:
The locals() function in Python returns a dictionary representing the local variables in the current namespace.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.