LearnFrenzy
Sign in Take a free test

Modules and Packages · Modules and Packages MCQ · Question 9

Why avoid import *? Answer, explanation & discussion

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

Why is from module import * discouraged?

  • A It is slower to run
  • B It hides where names come from and can overwrite existing names Correct
  • C It imports private names
  • D It does not work for the standard library
Correct Answer: Option B

For example, from os import * replaces the built-in open with os.open.

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