What are modules in python

What are modules in python:-


Hello guys today i will tell you about how what are modules in python and how to use modules in python but before knowing what are modules I python you need to understand it with a story to get it easily.

Now read carefully.

What are modules in python
What are modules in python



What are modules in python:-

 

Now understand it as a story,

Let us assume you find a early man who is trying to make a cycle, you ask him what is going to do the early man replied he is going to make a cycle. Now think with a open mind what did he need to make a cycle and how much time did he have to invest.

He has to make tires of cycle, brake of cycle, handle of cycle, body of cycle and seat of cycle.

What are modules in python
What are modules in python


Now if he will get all the parts like break, seat, tires, body etc at market so he need to join all the components together to make a cycle and it become much time saving and also think that is he is able to make tires as perfect is available in market.

It has a simple answer, no he is unable to make any component better or equal as available in market because the components which are available in market are at its top level and anyone can’t make better then it manually.

Now place yourself in the place of early man and think all components as modules, I think now you understand that modules are the components which are at top level and are available in market you can use the in your website or app developing so that you doesn’t need to make them yourself it saves your time and also make your product perfect because all the modules are at perfect level you only have to use them if you are trying to make or develop module it become very difficult to you to make it better than that which is available already.

 

What are modules in python
What are modules in python


How to use modules in python:-


You just need to import modules and to import modules you need to follow the simple steps as follows:-

 

· You have to go to start button of your computer/ laptop

· You have to search for power shell in it

· Now open power shell and click on yes button

· Now you have to type “pip install and the name of module”

· For example you have to type “pip install flask”

· Flask is a kind of modules which is used in development of website

· Now you have to press enter

· After that flask will install automatically but you have to connect your pc with internet.

· Now you can see successfully installed.

 

There are two types of modules

 

Ø  We have to import modules

Ø  There are inbuilt modules which come with python.

 

What are modules in python
What are modules in python


How to check which modules come with python:-


There is a way to check how much and which modules comes with python during downloading it you don’t know how to download python then you can check my last post link is at bottom.

To check how much and which modules comes with python during downloading are.


You have to go to Google chrome or another search browser and follow the simple steps:-

 

· You have to search for python built in modules

· Now you can get many types of modules which are written there.

· You can see all the modules and their uses

Leave a Comment