Python Modules

Tejasbhagat
1 min readJul 26, 2020

--

Modules in Python

In the last article we had discuss about” Python Modules”, like modules definition , what are

the” STANDARD LIBRARY MODULES “ then how to import a module in Python, Now in this article we will discuss how to define a module and how to import that in our program . In one module we can have functions ,variables, classes and we can access all of that by just importing that Module .

Making your own module_

User can easily create as many modules as user want, You will be surprised to know that we

are already been doing that ,Every Python program is a module ,that is every file that user save

as .py extension is a module .for example

def show():

print(“Hello”)

print(“Module name “ , __name__ )

show()

OUTPUT:

Hello

Module name __main__

For more information you can visite https://www.educationinfo4u.in/2020/07/python-modules-ii.html

Thank you

--

--