what is module \ modules ? | Sololearn: Learn to code for FREE!


what is module \ modules ?

( this word i listen so many times in different different languages. ex. c , cpp, java, python, etc. )

4/9/2021 6:52:07 AM


4 Answers

New Answer


A module is a Python object with arbitrarily named attributes that you can bind and reference. Simply, a module is a file consisting of Python code. A module can define functions, classes and variables.


Modules are extra files that we will have to import to our file in order to use their functions/classes. For eg. There is a file which has a function that sums 2 numbers We can import it to another file as a module and use its function! There are thousands of built-in modules in different languages that can be used to make it easier for us to make our code!


Calvin Thomas yes, the words modules and libraries are used interchangeably ig :)


Namit Jain [INACTIVE] Is it similar to libraries in C and C++?