Python is a high-level, general-purpose programming language known for its clean, readable syntax. It is one of the most popular languages in the world and a great first language.
What can you build with Python?
- Web apps — Django, Flask, FastAPI
- Data science and analysis — pandas, NumPy, Matplotlib
- AI and machine learning — scikit-learn, PyTorch, TensorFlow
- Automation and scripts — rename files, fill spreadsheets, scrape websites
- Desktop apps, games, IoT (Raspberry Pi)
Why Python?
- Easy to read — looks almost like English
- Huge standard library ("batteries included")
- Massive community and packages on PyPI
- In demand for jobs in web, data and AI
Key facts
- Interpreted — runs line by line, no separate compile step
- Dynamically typed — no need to declare variable types
- Uses indentation instead of
{ }to group code
This tutorial uses Python 3. Python 2 is no longer supported.
Example
Example — Your first Python program
Python
print("Hello, AgyanAdda!")
name = "Asha"
age = 21
print(f"{name} is {age} years old.")
for i in range(1, 4):
print("Line", i)
Output: Hello, AgyanAdda! Asha is 21 years old. Line 1 Line 2 Line 3