www.geeksforgeeks.org/what-is-the-difference-between-pythons-module-package-and-library/
Module: The module is a simple Python file that contains collections of functions and global variables and with having a .py extension file. It is an executable file and to organize all the modules we have the concept called Package in Python.
Example: Save the code in file called demo_module.py
Package: The package is a simple directory having collections of modules. This directory contains Python modules and also having __init__.py file by which the interpreter interprets it as a Package. The package is simply a namespace. The package also contains sub-packages inside it.
Library: The library is having a collection of related functionality of codes that allows you to perform many tasks without writing your code. It is a reusable chunk of code that we can use by importing it in our program, we can just use it by importing that library and calling the method of that library with period(.).
Example: Importing pandas library and call read_csv method using alias of pandas i.e. pd.
'IT > Python' 카테고리의 다른 글
[python openCV, cv2] src.emtpy() in function ... (0) | 2021.05.27 |
---|---|
Fatal error in launcher: Unable to create process using ... (0) | 2021.05.12 |
[Deeplearning] LOGISTIC REGRESSION CODE REVIEW-1 (0) | 2021.05.05 |
[Basic] 문자열 자료형-문자 표시하기: Format을 이용한 포매팅 (0) | 2021.04.28 |
Numpy(작성중) (0) | 2021.04.14 |