Databricks Certified Data Engineer Professional — Question 186

Which Python variable contains a list of directories to be searched when trying to locate required modules?

Answer options

Correct answer: B

Explanation

The correct answer is B, sys.path, which is specifically used by Python to determine which directories to search for modules. Option A, importlib.resource_path, is used for locating resources within packages, while C, os.path, deals with file system paths, and D, pypi.path, is not a standard Python variable.