Programming with Python

  1. Home
  2. Docs
  3. Programming with Python
  4. Modules in Python

Modules in Python

Modules refer to a file containing Python statements and definitions.

If you want to save a code as module save it using .py extension. The Module consists of functions, classes, variables, constants, etc.

We can use the module by importing it in our program. Grouping related code into a module makes the code easier to understand and use.

The Module name is the same as the file name we have saved our code.

Articles

Was this article helpful to you? Yes 1 No

How can we help?