
Answer-first summary for fast verification
Answer: sys.path
The correct answer is B. sys.path. In Python, the `sys.path` variable is a list of directory names that specifies the search path for modules. When a module is imported, Python searches through these directories in the order they are listed. This list includes the current directory, directories from the PYTHONPATH environment variable, and installation-dependent default paths. Other options like `importlib.resource_path` relate to resource handling, `os.path` is for path manipulations, `pypi.path` is not a standard Python variable, and `pylib.source` does not exist in the standard library.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.