-
Python is a high-level, general-purpose programming language known for its simplicity, readability, and versatility.
-
It is widely used in many fields such as automation, data science, web development, AI, networking, cybersecurity, and more.
-
Beginner-friendly syntax → very easy to read and write
-
Huge standard library → built-in modules for almost everything
-
Cross-platform → runs on Windows, macOS, Linux, and more
-
Large ecosystem → thousands of libraries (NumPy, Flask, TensorFlow, etc.)
-
Interpreted language → runs without compiling
-
Dynamic typing → variable types are determined at runtime
-
Automation & scripting
-
Web development (Django, Flask, FastAPI)
-
Data analysis & visualization
-
Machine learning & AI
-
Networking tools
-
Cybersecurity scripts
-
Game development
-
Desktop & GUI apps
-
Python is one of the most widely used languages globally due to its flexibility and ease of use.
-
Ideal for beginners and professionals alike.
-
Massive community support and continuous improvements.
-
Used by NASA, Google, Meta, Amazon, and many major tech companies.
Official download page:
https://www.python.org/downloads/
Or use:
-
Linux/macOS:
sudo apt install python3or already installed -
Windows Store: Install Python 3.x from Microsoft Store
-
pyenvfor managing multiple versions
-
Python files use the
.pyextension -
Run a Python file using:
python3 filename.pyor on Windows
python filename.py
print("Hello, Python!")
Run it:
python3 hello.py
Install packages:
pip install package_name
Check installed packages:
pip list
Upgrade pip:
pip install --upgrade pip
Python projects often need isolated environments.
python3 -m venv myenv
-
Linux/macOS:
source myenv/bin/activate -
Windows:
myenv\Scripts\activate
deactivate
Export installed libraries:
pip freeze > requirements.txt
Install from file:
pip install -r requirements.txt
Install:
pip install jupyter
Run:
jupyter notebook
Useful for data science, explanations, and interactive coding.
def main(): print("Python program running!") if __name__ == "__main__": main()