Python Modules

Modules are utilized to classify code in Python into littler part. A module is basically a document, where classes, capacities and variables are characterized. Gathering comparable code into a solitary document makes it simple to get to.

Observe over case:

In the event that the substance of a book is not listed or ordered into individual sections, then the book may have turned exhausting and boisterous. Subsequently, separating book into sections made it straightforward. In the same sense python modules are the documents which have comparative code. Along these lines module is disentangle a python code where classes, variables and capacities are characterized.


Python gives the accompanying favorable circumstances to utilizing module:

  • Reusability: Module can be utilized as a part of some other python code. Henceforth it gives the office of code reusability.
  • Categorization: Similar sort of properties can be set in one module.

Importing a Module

There are distinctive routes by which you we can import a module. These are as per the following: Using import proclamation: "import" proclamation can be utilized to import a module.