adplus-dvertising
frame-decoration

Question

______________ returns a dictionary of the module namespace.
________________ returns a dictionary of the current namespace

a.

locals()
globals()

b.

locals()
locals()

c.

globals()
locals()

d.

globals()
globals()

Answer: (d).globals()
globals()

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. ______________ returns a dictionary of the module namespace. ________________ returns a dictionary of the current namespace

Similar Questions

Discover Related MCQs

Q. What happens if a local variable exists with the same name as the global variable you want to access?

Q. The nested list undergoes shallow copy even when the list as a whole undergoes deep copy. State whether this statement is true or false.

Q. In _______________ copy, the base address of the objects are copied.
In _______________ copy, the base address of the objects are not copied.

Q. Which of these is not true about recursion?

Q. Only problems that are recursively defined can be solved using recursion. True or False?

Q. Which is the most appropriate definition for recursion?

Q. On assigning a value to a variable inside a function, it automatically becomes a global variable. State whether true or false.

Q. Which of the following data structures is returned by the functions globals() and locals()?

Q. Where are the arguments received from the command line stored?

Q. How are required arguments specified in the function heading?

Q. How are default arguments specified in the function heading?

Q. What is the value stored in sys.argv[0]?

Q. What is the type of sys.argv?

Q. Which module in the python standard library parses options received from the command line?

Q. How are variable length arguments specified in the function heading?

Q. How many keyword arguments can be passed to a function in a single function call?

Q. How are keyword arguments specified in the function heading?

Q. What is the length of sys.argv?

Q. What is the type of each element in sys.argv?