Basic Python - Modules

avatar

NaN years ago

Simply, a module is a file consisting of Python code. A module can define functions, classes and variables. We use modules to break down large programs into small manageable and organized files. Furthermore, modules provide reusability of code and make the code easier to understand and use.


There is two way to use modules

  1. We can define our most used functions in a module and import them, instead of copying their definitions into different programs.
  2. We can download the required package from the library and then import the functions, instead of writing complex functions


Learn more about Python modules, and use resources.

approvedApproved by experts
Advance Topics

Neuton's Mission

We are a team of young and enthusiastic people who are passionate about education and want to help students to learn the skills they need to succeed in life. If you want to support us, please join our community.

phonephonephonephonemail