Python Day 2: Modules and Pip By Safia Khatoon


What is Modules ?
Modules are used to borrow someone else’s code .
There are 2 Types of module :
Built-in Modules: Built-in modules are modules that do not need to be installed externally; they are already included with Python.
example : math, random, os, etc.
External Modules: External modules are those modules that you install from the internet. For example, in your home, the kitchen is like a built-in module, and the kitchen items like sugar, milk, and rice are like external modules.
Example: pandas, numpy, flask, django
What is pip ?
It installs modules from the internet.
Practical:
write pip in your command line
pip install pandas
How to Uninstall Modules:
pip uninstall pandas
What is the difference between command line tools and Replit?
In command line tools, errors can occur, but in Replit, it's more convenient to use. If you install a module from the internet, you simply write
import <module_name>
, and it's installed and imported without needing to writepip install <module_name>
.what is import ?
In Python,
import
is used to bring in code from other files or libraries so you can use it in your program.
Subscribe to my newsletter
Read articles from SAFIA KHATOON directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

SAFIA KHATOON
SAFIA KHATOON
Hi! My name is Safia Khatoon. I am complete my Bachelors in Technology from RTC Institute Of Technology. My specialisation in Computer Science and Engineering.I love contributing to Open Source with the help of the skills I gain. Also, I'm working on my YouTube Channel as well where I teach about DevOps tools and make technical content. You can have a look at it through my profile. Feel free to reach out to me! I'd be happy to connect with you.