__package__Easy Playground

The name of the package a module belongs to

Python Playground
Output
Click "Run" to execute your code

__package__ is a special attribute that the name of the package a module belongs to.

Challenge

Try modifying the code above to explore different behaviors. Can you extend the example to handle a new use case?