๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

Python Beginner

What is Module?

A Python file containing definitions and statements that can be imported and reused in other Python programs.

A module is simply a .py file. It can define functions, classes, and variables. Modules promote code reuse and organization. Import with import module_name or from module import function.

Python comes with a rich standard library of modules (os, sys, json, datetime, etc.). Third-party modules are installed via pip. Packages are directories of modules with an __init__.py file.

Related Terms

Python Property
A built-in decorator that lets you define methods that behave like attributes, enabling controlled access to instance data.
Asyncio
A Python library for writing concurrent code using async/await syntax for non-blocking I/O operations.
Python ABC Module
The Abstract Base Classes module that enables defining interfaces and abstract methods that subclasses must implement.
List Comprehension
A concise syntax for creating new lists by applying an expression to each item in an existing iterable.
Walrus Operator
The := operator that assigns a value to a variable as part of an expression, introduced in Python 3.8.
NumPy
A fundamental library for numerical computing in Python, providing efficient multi-dimensional arrays and mathematical operations.
View All Python Terms โ†’