1.

Which of these is false about a package?(a) A package can have subfolders and modules(b) Each import package need not introduce a namespace(c) import folder.subfolder.mod1 imports packages(d) from folder.subfolder.mod1 import objects imports packagesThis question was addressed to me at a job interview.The doubt is from Mapping Functions in section Mapping Functions and Modules of Python

Answer»

The correct option is (B) Each import package need not introduce a namespace

To EXPLAIN: Packages provide a WAY of STRUCTURING PYTHON namespace. Each import package introduces a namespace.



Discussion

No Comment Found

Related InterviewSolutions