Q. What is a module, package and a library?


Answer =


Module: A module is a file with some Python code and is saved with a .py extension.

Package: A package is a directory that contains sub-packages and modules in it along with some special files such as __init__.py.

Library: A Python library is a reusable chunk of code that is used in program/script using import command. A package is a library if it is installable or gets attached to site-packages folder of Python installation. The line between a package and a Python library is quite blurred and both these terms are often used interchangeably.

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post