LearnFrenzy
Sign in Take a free test

Modules and Packages · Modules and Packages MCQ · Question 4

What is sys.path? Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 4 Back to Exercise

What does sys.path contain?

  • A The path of the Python executable only
  • B The list of folders Python searches for modules, in order Correct
  • C All modules already imported
  • D The current working directory only
Correct Answer: Option B

Already-imported modules are in sys.modules; sys.path is the search list.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links