QuestionQ128

VerifiedModules and Packages

A Python module called pymod.py contains a variable named pyvar. Which of the following snippets allow access to this variable?

Choose two
Explanation

Importing pymod permits access to its attributes through qualified notation such as pymod.pyvar. A wildcard import places the module’s public names, including pyvar, into the importing namespace, where pyvar can be referenced directly.

Community Discussion

No comments yet. Be the first to start the discussion!