Python Module
for more updates visit:
VINOD KUMAR VERMA, PGT(CS), KV OEF KANPUR & SACHIN BHARDWAJ,
PGT(CS), KV NO.1 TEZPUR
PYTHON MODULE
Group of functions, classes, variables
for more updates visit:
What is Python Module
?
?
A Module is a file containing Python definitions
(docstrings) , functions, variables, classes and
statements.
Act of partitioning a program into individual
components(modules) is called modularity. A module is a
separate unit in itself.
It reduces its complexity to some degree
? It creates numbers of well-defined, documented boundaries
within program.
? Its contents can be reused in other program, without having
to rewrite or recreate them.
?
VINOD KUMAR VERMA, PGT(CS), KV OEF KANPUR &
SACHIN BHARDWAJ, PGT(CS), KV NO.1 TEZPUR
for more updates visit:
Structure of Python module
?
?
A python module is simply a normal python file(.py)
and contains functions, constants and other elements.
Python module may contains following objects:
docstring
Triple quoted comments. Useful for documentation
purpose
Variables and
constants
For storing values
Classes
To create blueprint of any object
Objects
Object is an instance of class. It represent class in real world
Statements
Instruction
Functions
Group of statements
VINOD KUMAR VERMA, PGT(CS), KV OEF KANPUR &
SACHIN BHARDWAJ, PGT(CS), KV NO.1 TEZPUR
for more updates visit:
Composition/Structure of python module
MODULES
VARIABLES
OTHER
PYTHON
MODULES
FUNCTIONS
VARIABLES
IMPORT
CLASSES
MEMBERS
METHODS
VINOD KUMAR VERMA, PGT(CS), KV OEF KANPUR &
SACHIN BHARDWAJ, PGT(CS), KV NO.1 TEZPUR
OTHER
PYTHON
MODULES
for more updates visit:
Importing Python modules
?
To import entire module
? import
? Example: import math
?
To import specific function/object from module:
? from
import
? Example: from math import sqrt
?
import * : can be used to import all names from
module into current calling module
VINOD KUMAR VERMA, PGT(CS), KV OEF KANPUR &
SACHIN BHARDWAJ, PGT(CS), KV NO.1 TEZPUR
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- how to create a ros package in python in easy steps
- python operating system access university of cambridge
- python modules
- python ii introduction to data analysis with python dartmouth
- more python functions and modules github pages
- using root classes from python
- introduction to python harvard university
- python module
- cdo s python bindings ecmwf
- biggest online tutorials library
Related searches
- python get module attributes
- install python module in jupyter notebook
- vscode python module path
- python 3 module search path
- python import module relative path
- python show module path
- python set module path
- python import module from relative path
- python import module from path
- import python module from another directory
- pycharm set python module path
- python sys module documentation