Skip to content
🐍

Python Basics

50 lessons

Get started with Python — variables, data types, functions, lists, dictionaries, and modules.

  1. 1

    Python Overview

    What Python is, where it runs, and why it is one of the most popular languages for beginners and professionals alike.

  2. 2

    Python Variables

    How to create and use variables in Python — dynamic typing, naming, and assignment.

  3. 3

    Python Data Types

    Python's core data types: numbers, strings, booleans, lists, tuples, dictionaries, and sets.

  4. 4

    Conditions and Loops

    Making decisions with if/elif/else and repeating with for and while loops.

  5. 5

    Python Functions

    Defining functions with def, parameters, return values, and default arguments.

  6. 6

    Python Strings

    Master Python strings: slicing, methods, f-strings, formatting, and encoding for text processing.

  7. 7

    Python Lists

    Working with lists: indexing, slicing, methods, sorting, and list comprehensions for ordered collections.

  8. 8

    Python Dictionaries

    Key-value mappings with dicts: creation, access, methods, iteration, and nested structures.

  9. 9

    Python Tuples

    Immutable sequences with tuples: creation, packing, unpacking, and when to use them over lists.

  10. 10

    Python Sets

    Unordered collections of unique elements: set operations, frozenset, and deduplication.

  11. 11

    File Handling in Python

    Read and write files with open(), modes, the with statement, and path operations with pathlib.

  12. 12

    Exceptions and Error Handling

    Handle errors gracefully with try/except/else/finally, raise exceptions, and create custom ones.

  13. 13

    Classes and Objects

    Object-oriented programming in Python: classes, instances, methods, attributes, and __init__.

  14. 14

    Inheritance and Polymorphism

    Extend classes with inheritance, override methods, use super(), and leverage polymorphism.

  15. 15

    Python Modules

    Organize code into modules with import, from-import, __name__, and the standard library.

  16. 16

    Python Packages

    Structure multi-file projects with packages, __init__.py, relative imports, and namespace packages.

  17. 17

    Virtual Environments

    Isolate project dependencies with venv, activate and deactivate, and manage multiple Python versions.

  18. 18

    pip and Package Management

    Install, upgrade, and manage Python packages with pip, PyPI, and pyproject.toml.

  19. 19

    List Comprehensions

    Write concise, readable list transformations with comprehensions, filters, and nested loops.

  20. 20

    Lambda Functions

    Anonymous functions with lambda: syntax, use with map/filter/sorted, and when to avoid them.

  21. 21

    Decorators

    Transform functions with decorators: the @ syntax, functools.wraps, and practical decorator patterns.

  22. 22

    Generators

    Create lazy, memory-efficient sequences with generator functions, yield, and generator expressions.

  23. 23

    Iterators and Iterables

    Understand the iterator protocol: __iter__, __next__, iter(), next(), and custom iterables.

  24. 24

    Context Managers

    Manage resources with with statements: __enter__/__exit__, contextlib, and async context managers.

  25. 25

    Type Hints

    Add static type annotations with type hints, the typing module, and mypy for type checking.

  26. 26

    Dates and Times

    Work with dates and times using datetime, timedelta, formatting, timezones, and parsing.

  27. 27

    JSON Handling

    Parse, generate, and validate JSON with the json module, custom encoders, and error handling.

  28. 28

    Regular Expressions

    Match and extract text patterns with the re module: search, match, groups, and substitution.

  29. 29

    Unit Testing Basics

    Write and run tests with unittest and pytest: assertions, fixtures, mocking, and coverage.

  30. 30

    Python Best Practices

    Write idiomatic, clean Python: PEP 8, naming, project structure, tooling, and common conventions.

  31. 31

    Decorators Deep Dive

    A comprehensive guide to Decorators Deep Dive in Python, covering core concepts, implementation details, and practical examples.

  32. 32

    Context Managers and with Statement

    A comprehensive guide to Context Managers and with Statement in Python, covering core concepts, implementation details, and practical examples.

  33. 33

    Metaclasses and Class Creation

    A comprehensive guide to Metaclasses and Class Creation in Python, covering core concepts, implementation details, and practical examples.

  34. 34

    Descriptors and Attribute Access

    A comprehensive guide to Descriptors and Attribute Access in Python, covering core concepts, implementation details, and practical examples.

  35. 35

    Generators and yield

    A comprehensive guide to Generators and yield in Python, covering core concepts, implementation details, and practical examples.

  36. 36

    Async Await and asyncio

    A comprehensive guide to Async Await and asyncio in Python, covering core concepts, implementation details, and practical examples.

  37. 37

    Type Hints and mypy

    A comprehensive guide to Type Hints and mypy in Python, covering core concepts, implementation details, and practical examples.

  38. 38

    Dataclasses

    A comprehensive guide to Dataclasses in Python, covering core concepts, implementation details, and practical examples.

  39. 39

    Properties and Slots

    A comprehensive guide to Properties and Slots in Python, covering core concepts, implementation details, and practical examples.

  40. 40

    Abstract Base Classes

    A comprehensive guide to Abstract Base Classes in Python, covering core concepts, implementation details, and practical examples.

  41. 41

    Multiple Inheritance and MRO

    A comprehensive guide to Multiple Inheritance and MRO in Python, covering core concepts, implementation details, and practical examples.

  42. 42

    Dunder Methods and Operator Overloading

    A comprehensive guide to Dunder Methods and Operator Overloading in Python, covering core concepts, implementation details, and practical examples.

  43. 43

    Memory Views and Buffers

    A comprehensive guide to Memory Views and Buffers in Python, covering core concepts, implementation details, and practical examples.

  44. 44

    The collections Module

    A comprehensive guide to The collections Module in Python, covering core concepts, implementation details, and practical examples.

  45. 45

    The itertools Module

    A comprehensive guide to The itertools Module in Python, covering core concepts, implementation details, and practical examples.

  46. 46

    The functools Module

    A comprehensive guide to The functools Module in Python, covering core concepts, implementation details, and practical examples.

  47. 47

    Concurrency with threading

    A comprehensive guide to Concurrency with threading in Python, covering core concepts, implementation details, and practical examples.

  48. 48

    Multiprocessing

    A comprehensive guide to Multiprocessing in Python, covering core concepts, implementation details, and practical examples.

  49. 49

    C Extensions with ctypes

    A comprehensive guide to C Extensions with ctypes in Python, covering core concepts, implementation details, and practical examples.

  50. 50

    Packaging with pyproject.toml

    A comprehensive guide to Packaging with pyproject.toml in Python, covering core concepts, implementation details, and practical examples.

Completed: 0 / 500%

Learning Stages

Est. total: 14h 25m
  1. 1

    Foundation

    13 lessons · 2h 10m

    Build a solid foundation with the essential concepts and syntax.

    0/13
  2. Core

    13 lessons · 3h 15m

    Deepen your understanding with core patterns and common use cases.

    0/13
  3. Intermediate

    12 lessons · 4h

    Tackle intermediate topics and start combining concepts fluently.

    0/12
  4. Advanced

    12 lessons · 5h

    Master advanced techniques and apply them to real-world problems.

    0/12

Completion Standard

Complete 80% lessons, 60% exercises, and 50% projects to master this topic.

Overall0%
  • Lessons0 / 200%
  • Exercises0 / 1000%
  • Projects0 / 100%

Skill Assessment

0 / 20 mastered
0 mastered0 in progress20 not started
  • Python Syntax & VariablesFoundation
    0 / 4 lessons · 0%
  • Python Data StructuresCore
    0 / 6 lessons · 0%
  • Python FunctionsCore
    0 / 4 lessons · 0%
  • Python OOPIntermediate
    0 / 3 lessons · 0%
  • Modules & PackagesCore
    0 / 4 lessons · 0%
  • Advanced Python FeaturesAdvanced
    0 / 4 lessons · 0%
  • Python Async & ConcurrencyAdvanced
    0 / 3 lessons · 0%
  • Python TestingIntermediate
    0 / 2 lessons · 0%

+12 more skills

Recommended next: python-overview
20 remaining

Build real projects

Apply what you learned by building guided projects with starter code and solutions.

View projects

Decode error messages

Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.

View errors