Modules in Python

“Good things come to people who wait, but better things come to those who go out and get them.”

Hello friends !!!! Lets us see about modules 🙂 🙂 🙂 🙂

In Python, Modules are simply files with the “. py” extension containing Python code

lets , Us see in details what is Module?? “Module means the program which is written already and its reference is given with .py extension means no need to write the program at you write it such as module you can use it at anytime”

For Example

In this type we can use

The name of the Python file becomes the module name.

The module contains —  1) definitions and implementation of classes  2) variables and 3) functions that can be used inside another program.

Advantages of modules –

  • Reusability : Working with modules makes the code reusable.
  • Simplicity: Module focuses on a small proportion of the problem, rather than focusing on the entire problem.
  • Scoping: A separate namespace is defined by a module that helps to avoid collisions between identifiers.

Thankyou all this is short and sweet information of module we will about libraries be in touch ……please comment for quires

You may also like...

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: