Packages are the namespaces within which consists many modules and packages. Every package is none other than a directory that consists a file called “–init__.py”. This file describes the directories as packages.

For example, we have created the prime.py module in the above example. Now let us create the package for the same.

To create a package, we will to follow the below steps.

first have the module ready, that is prime.py

Create a directory called “primenum” and keep the above module in that directory.