PCAP Exam QuestionsBrowse all questions from this exam

PCAP Exam - Question 77


With regards to the directory structure below, select the proper forms of the directives in order to import module_a. (Choose two.)

Show Answer
Correct Answer: AD

To import module_a in this directory structure, two correct forms of the directive can be used. First, 'from pypack import module_a' allows direct access to module_a by importing it from the pypack package. Second, 'import pypack.module_a' imports the entire package and accesses module_a as an attribute of pypack. Both forms are appropriate for importing module_a in this context.

Discussion

1 comment
Sign in to comment
macxszOptions: AD
May 3, 2022

A. from pypack import module_a D. import pypack.module_a