1.

Which of the statements about modules is false?(a) In the “from-import” form of import, identifiers beginning with two underscores are private and aren’t imported(b) dir() built-in function monitors the items in the namespace of the main module(c) In the “from-import” form of import, all identifiers regardless of whether they are private or public are imported(d) When a module is loaded, a compiled version of the module with file extension .pyc is automatically producedI had been asked this question by my school principal while I was bunking the class.The origin of the question is Python Modules in chapter Mapping Functions and Modules of Python

Answer» RIGHT option is (c) In the “from-import” form of import, all IDENTIFIERS regardless of whether they are private or public are imported

Easiest EXPLANATION - In the “from-import” form of import, identifiers beginning with two UNDERSCORES are private and aren’t imported.


Discussion

No Comment Found

Related InterviewSolutions