Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What is the difference between a module and a package in Python?

  1. A A module is a single .py file; a package is a directory of modules
  2. B A package is a single file
  3. C They are the same
  4. D A module cannot be imported
Answer

A module is a single .py file; a package is a directory of modules

A package is a directory, historically containing __init__.py. Namespace packages since Python 3.3 no longer require that file.

All Python MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as