Python's __all__: Packages, Modules, and Wildcard Imports Quiz

Interactive Quiz ⋅ 9 Questions
By Joseph Peart

In this quiz, you’ll test your understanding of Python’s __all__: Packages, Modules, and Wildcard Imports.

By working through this quiz, you’ll revisit how wildcard imports work, what role the __all__ variable plays in modules and packages, and how to define a clean public API for your Python code.

You’ll need to know the basics of Python modules and packages and the import system to get the most out of this quiz. Good luck!

The quiz contains 9 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. Good luck!

Related Resources

Tutorial

Python's __all__: Packages, Modules, and Wildcard Imports

In this tutorial, you'll learn about wildcard imports and the __all__ variable in Python. With __all__, you can prepare your packages and modules for wildcard imports, which are a quick way to import everything.

intermediate python