Learning Lab / Python Mastery
🐍

Python Mastery

From basics to advanced Python programming

4 Lessons Self-paced Free

Track Progress

Your journey through Python Mastery

0 / 4 lessons 0%
1
Beginner

Python Basics

Variables, data types, and basic operations

30 min
Code Example
# Variables and Data Types
name = "Th7media"
age = 25
is_developer = True

# Basic Operations
print(f"Hello, I'm {name}")
print(f"Next year I'll be {age + 1}")

# Lists
skills = ["Python", "Flask", "Design"]
print(f"My skills: {', '.join(skills)}")
2
Beginner

Control Flow

If statements, loops, and logic

45 min
Code Example
# If Statements
score = 85

if score >= 90:
    grade = "A"
elif score >= 80:
    grade = "B"
else:
    grade = "C"

# For Loops
for i in range(5):
    print(f"Iteration {i}")

# List Comprehension
squares = [x**2 for x in range(10)]
print(squares)  # [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
3
Intermediate

Functions & Modules

Creating reusable code blocks

60 min
Code Example
# Function Definition
def greet_user(name, greeting="Hello"):
    return f"{greeting}, {name}!"

# Lambda Functions
multiply = lambda x, y: x * y

# Decorators
def timer(func):
    import time
    def wrapper(*args, **kwargs):
        start = time.time()
        result = func(*args, **kwargs)
        print(f"Time: {time.time() - start:.2f}s")
        return result
    return wrapper

@timer
def slow_function():
    import time
    time.sleep(1)
    return "Done!"
4
Intermediate

Object-Oriented Programming

Classes, objects, and inheritance

75 min
Code Example
class Developer:
    def __init__(self, name, skills):
        self.name = name
        self.skills = skills
        self.experience = 0
    
    def add_skill(self, skill):
        self.skills.append(skill)
    
    def code(self):
        return f"{self.name} is coding..."

class FullStackDev(Developer):
    def __init__(self, name, skills, frontend_stack):
        super().__init__(name, skills)
        self.frontend_stack = frontend_stack
    
    def build_app(self):
        return f"Building full-stack app with {self.frontend_stack}"

# Usage
th7 = FullStackDev("Th7", ["Python"], "React")
print(th7.build_app())