Introduction to Python #
1. What is Python? #
Python is a high-level programming language known for its simplicity and readability. It is used in various fields:
✅ Web development
✅ Data Science and Machine Learning
✅ Automation and scripting
✅ Cybersecurity, etc.
Some key characteristics of Python:
- Interpreted: The code runs line by line.
- Multi-paradigm: Supports procedural, object-oriented, and functional programming.
- Rich ecosystem: A vast collection of libraries (Django, NumPy, etc.).
👉 Recommended reading:
2. Installing Python #
-
Check if Python is already installed
- Open a terminal and type:
python --version
- Or, depending on your system:
python3 --version
- Open a terminal and type:
-
Install Python
- 📌 Windows/Mac: Download Python
- 📌 Linux (Debian/Ubuntu):
sudo apt update && sudo apt install python3
- 📌 Linux (Void Linux):
sudo xbps-install -S python3
3. Testing the Python Interpreter #
Once installed, let’s test the interpreter:
python3
An interactive prompt appears:
>>> print("Hello, World!")
Hello, World!
💡 The Python interpreter allows real-time command execution, making it useful for quickly testing code.