π Hey there!
If you're here, that means you've already started your Python journey. Maybe you've printed "Hello, World!" or built a simple calculator. That’s awesome!
Now it's time to level up. In this part, you’ll learn the skills you need to move from beginner to mid-level Python developer — the kind of skills that help you build real projects, crack job interviews, and feel confident with code.
Let’s go! π
π Before You Begin
If you haven’t checked out Part 1 of this guide, go read that first — it shows you how to install Python, learn the basics, and start your journey:
π How to Learn Python from Scratch – Part 1
π§ Learning Roadmap – From Basics to Mid-Level
1. π§ Object-Oriented Programming (OOP)
Why it’s important:
It helps you organize your code better and is used in most real-world apps and interviews.
- Class = A blueprint
- Object = A thing made from that blueprint
- __init__() = Special function that runs when the object is created
- Inheritance = One class can "copy" another
- Encapsulation = Hide details inside a class
- Polymorphism = Same function works differently depending on the object
class Dog:
def __init__(self, name):
self.name = name
def speak(self):
return f"{self.name} says Woof!"
class GuideDog(Dog):
def speak(self):
return f"{self.name} gives a soft bark."
dog1 = Dog("Bruno")
dog2 = GuideDog("Rex")
print(dog1.speak()) # Bruno says Woof!
print(dog2.speak()) # Rex gives a soft bark.
π Mini Project: Bank Account system with deposit, withdraw, and balance features.
2. π¨ Error Handling
Why it’s important:
It helps your program not crash when something goes wrong.
try
/except
else
/finally
- Custom error messages
def divide(x, y):
try:
return x / y
except ZeroDivisionError:
print("Oops! Can't divide by zero.")
finally:
print("Function completed.")
print(divide(10, 2))
print(divide(10, 0))
π Mini Project: Login system with error messages.
3. π File Handling
Why it’s important:
You can read/write files — great for notes, logs, etc.
- Open, write, and read files
- Use the
csv
module
# Write
with open("note.txt", "w") as f:
f.write("Learning Python is fun!")
# Read
with open("note.txt", "r") as f:
print(f.read())
π Mini Project: Build a note-taking app.
4. π¦ Modules and Packages
Why it’s important:
Keeps your code organized and reusable.
- Use built-in modules
- Create your own
.py
file - Use
if __name__ == "__main__"
# utils.py
def greet(name):
return f"Hello, {name}!"
# main.py
import utils
print(utils.greet("Alex"))
π Mini Project: Tools module (calculator, converters, etc.)
5. π Virtual Environment & pip
Why it’s important:
Manages project dependencies safely.
python -m venv myenv
source myenv/bin/activate # Mac/Linux
myenv\Scripts\activate # Windows
pip install flask
π Mini Project: Build a Flask "Hello World" app.
6. π Working with APIs
Why it’s important:
Fetch live data like weather or users.
- Use
requests
- Work with JSON
import requests
res = requests.get("https://randomuser.me/api/")
if res.status_code == 200:
data = res.json()
print("Random user:", data["results"][0]["name"]["first"])
π Mini Project: Create a weather app using OpenWeatherMap API.
7. π§ Data Structures & Algorithms
Why it’s important:
Essential for coding interviews and speed.
name = "Python"
age = 25
pi = 3.14
is_active = True
fruits = ["apple"]
dimensions = (1920, 1080)
unique = {1, 2, 3}
student = {"name": "Ali", "age": 20}
- Sorting: Bubble, Merge sort
- Searching: Linear, Binary
- Big O Notation
π Practice: LeetCode, HackerRank, Exercism
π‘ What You Can Build After This
- Weather app with API
- Flask blog
- CLI note manager
- Auto-renaming tool
- Portfolio projects
π Tools You Should Learn
- Git & GitHub
- VS Code
- Jupyter Notebook
- Python Tutor
π― Bonus: 100 Days of Code
- Code 30 min daily
- Post progress online
- Build projects
Plan:
- Days 1–10: Basics
- Days 11–30: OOP & Errors
- Days 31–60: Files & APIs
- Days 61–80: Modules & Flask
- Days 81–100: Projects
✨ Final Words
Moving from beginner to mid-level is all about practice, patience, and projects. Don’t worry about mistakes — that’s how real learning happens.
Stay curious, build often, and get ready for Part 3 — covering web development, data science, and automation.
Till then, happy coding! ππ»
If anyone is interested in a project or anything, feel free to comment. I'd be happy to assist and collaborate with you!