A module is a Python file containing Python statements and definitions. For example, a file evenodd.py is a module, and we call it ‘even-odd’. We put similar code together in one module. This helps us modularize our code, and make it much easier to deal with. And not only that, a module grants us reusability.
A package, in essence, is like a directory holding sub-packages and modules. While we can create our own packages, we can also use one from the Python Package Index (PyPI) to use for our projects.
Answer ( 1 )
A module is a Python file containing Python statements and definitions. For example, a file evenodd.py is a module, and we call it ‘even-odd’. We put similar code together in one module. This helps us modularize our code, and make it much easier to deal with. And not only that, a module grants us reusability.
A package, in essence, is like a directory holding sub-packages and modules. While we can create our own packages, we can also use one from the Python Package Index (PyPI) to use for our projects.