Python Roadmap

This Python Roadmap is a free, full-text syllabus of 85 lessons in 22 stages, starting with Learn the Basics and ending with Testing. It suits anyone who wants to learn Python, whether new to it or filling gaps. There is no fixed length: every lesson is open from the start, so you go at your own pace and skip what you already know.

Last updated

Getting Started0%
Halfway
Almost There
Complete

Reading is open to everyone. Sign in to join this roadmap and track what you finish.

Continue learning

1. Learn the BasicsLearn the Basics

0%

Learn the Basics

17 topics · 16 sub-topics · 0 completed

0%

Full syllabus: every lesson in the Python roadmap

22 stages and 85 lessons, in the order the roadmap suggests. Every lesson is free to read and open from the start.

  1. Stage 1: Learn the Basics

    • Learn the Basics

      Python is a high-level, interpreted, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Python is dynamically-typed and garbage-collected.

    • Lists

      Lists are fundamental data structures in Python used to store an ordered collection of items. These items can be of different data types (numbers, strings, or even other lists), and lists are mutable, meaning you can change their contents after they are created by adding, removing, or modifying elements. They are…

    • Tuples

      A tuple is an ordered and immutable collection of elements in Python. Unlike lists, tuples cannot be modified after creation, making them useful for storing fixed data such as coordinates, configuration values, or records that should remain unchanged. Tuples support indexing, iteration, and unpacking, and because…

    • Sets

      Python Set is an unordered collection of data types that is iterable, mutable, and has no duplicate elements. The order of elements in a set is undefined though it may consist of various elements. The major advantage of using a set, as opposed to a list, is that it has a highly optimized method for checking whether…

    • Dictionaries

      In Python, a dictionary is a built-in data type that allows you to store key-value pairs. Each key in the dictionary is unique, and each key is associated with a value. Starting from Python 3.7, dictionaries maintain the order of items as they were added.

    • Type Casting

      The process of converting the value of one data type (integer, string, float, etc.) to another data type is called type conversion. Python has two types of type conversion: Implicit and Explicit.

    • Functions, Builtin Functions

      In programming, a function is a reusable block of code that executes a certain functionality when it is called. Functions are integral parts of every programming language because they help make your code more modular and reusable. In Python, we define a function with the def keyword, then write the function…

    • Exceptions

      Exceptions are runtime errors that occur during program execution in Python. Instead of immediately stopping the program, Python allows developers to handle these errors using try, except, else, and finally blocks. Proper exception handling helps manage unexpected situations such as invalid input, missing files, or…

    • Comments

      Docstrings and comments document what code does and why. A docstring is a string literal placed right after a function, class, or module definition, and it becomes accessible through the object's doc attribute, which tools use to generate documentation automatically. Comments, marked with , explain specific lines…

    • Type Annot.

      Type annotations let developers specify the expected data types of variables, function parameters, and return values in Python. The interpreter does not enforce these hints at runtime, but tools like mypy and pyright use them to catch type errors before execution. A function can declare def add(a: int, b: int) -…

    • Basic Syntax

      Setup the environment for python and get started with the basics.

    • Variables and Data Types

      Variables are used to store information to be referenced and manipulated in a computer program. They also provide a way of labeling data with a descriptive name, so our programs can be understood more clearly by the reader and ourselves. It is helpful to think of variables as containers that hold information. Their…

    • Operators

      Operators are symbols or keywords that perform operations on values and variables. Python includes several types: arithmetic operators (+, -, \, /) for math calculations, comparison operators (==, !=, <, ) for evaluating relationships between values, and logical operators (and, or, not) for combining conditions.…

    • @

    • Working with Strings

      Strings in Python are sequences of characters used to represent text. You can create them by enclosing characters within single quotes, double quotes, or triple quotes. Once created, strings are immutable, meaning their values cannot be changed directly. Common operations include accessing individual characters…

    • Conditionals

      Conditional Statements in Python perform different actions depending on whether a specific condition evaluates to true or false. Conditional Statements are handled by if-elif-else statements and MATCH-CASE statements in Python.

    • Loops

      Loops are programming structures that allow you to execute a block of code repeatedly as long as a specific condition remains true or for a set number of iterations. In Python, the two primary types of loops are for loops, which are typically used to iterate over a sequence like a list, tuple, or string, and while…

  2. Stage 2: Data Structures & Algorithms

    • Data Structures & Algorithms

      A data structure is a named location that can be used to store and organize data. And, an algorithm is a collection of steps to solve a particular problem. Learning data structures and algorithms allow us to write efficient and optimized computer programs.

    • PyPI

      PyPI, typically pronounced pie-pee-eye, is a repository containing several hundred thousand packages. These range from trivial Hello, World implementations to advanced deep learning libraries.

    • Pip

      The standard package manager for Python is pip. It allows you to install and manage packages that aren’t part of the Python standard library.

    • Conda

      Conda is an open source package management system and environment management system that runs on Windows, macOS, and Linux. Conda quickly installs, runs and updates packages and their dependencies. Conda easily creates, saves, loads and switches between environments on your local computer. It was created for Python…

    • uv

      uv is an "extremely fast" python package installer and resolver.

    • Arrays and Linked Lists

      Arrays store elements in contiguous memory locations, resulting in easily calculable addresses for the elements stored and this allows faster access to an element at a specific index. Linked lists are less rigid in their storage structure and elements are usually not stored in contiguous locations, hence they need…

    • Poetry

      Poetry is a dependency management and packaging tool that simplifies the process of handling libraries and project builds in a single configuration file. It manages virtual environments automatically and uses a lock file to ensure that every developer on a project uses the exact same version of every dependency. It…

    • pdm

      PDM is a modern Python package manager that supports PEP 582, which allows packages to be installed in a pypackages directory instead of the traditional site-packages directory. It aims to provide a streamlined and improved experience for managing dependencies, building, and publishing Python projects. PDM also…

    • HashMaps

      HashMap, HashTable, Map, Dictionary, or Associative are all the names of the same data structure. It is a data structure that implements a set abstract data type, a structure that can map keys to values.

    • Heaps, Stacks and Queues

      Heaps, stacks, and queues are fundamental data structures used to organize and manage data efficiently based on specific rules of access. A stack follows the Last-In, First-Out (LIFO) principle, where the last element added is the first one removed, similar to a stack of plates. A queue operates on a First-In,…

    • Binary Search Tree

      A binary search tree, also called an ordered or sorted binary tree, is a rooted binary tree data structure with the key of each internal node being greater than all the keys in the respective node's left subtree and less than the ones in its right subtree

    • Recursion

      Recursion is a method of solving a computational problem where the solution depends on solutions to smaller instances of the same problem. Recursion solves such recursive problems by using functions that call themselves from within their own code.

    • Sorting Algorithms

      Sorting refers to arranging data in a particular format. Sorting algorithm specifies the way to arrange data in a particular order. Most common orders are in numerical or lexicographical order. The importance of sorting lies in the fact that data searching can be optimized to a very high level, if data is stored in…

    • Builtin

      Python has a rich standard library of built-in modules that provide a wide range of functionality. Some of the most commonly used built-in modules include: sys, os, math, datetime, random, re, itertools, etc.

    • Custom

      Modules refer to a file containing Python statements and definitions. A file containing Python code, for example: example.py, is called a module, and its module name would be example. We use modules to break down large programs into small manageable and organized files. Furthermore, modules provide reusability of code.

  3. Stage 3: Modules

    • Modules

      Modules refer to a file containing Python statements and definitions. A file containing Python code, for example: example.py, is called a module, and its module name would be example. We use modules to break down large programs into small manageable and organized files. Furthermore, modules provide reusability of code.

  4. Stage 4: Error Handling

    • Error Handling

  5. Stage 5: Lambdas

    • Lambdas

      Python Lambda Functions are anonymous function means that the function is without a name. As we already know that the def keyword is used to define a normal function in Python. Similarly, the lambda keyword is used to define an anonymous function in Python.

  6. Stage 6: Decorators

    • Decorators

      Decorator is a design pattern in Python that allows a user to add new functionality to an existing object without modifying its structure. Decorators are usually called before the definition of a function you want to decorate.

  7. Stage 7: Package Managers

    • Package Managers

      Package managers allow you to manage the dependencies (external code written by you or someone else) that your project needs to work correctly. PyPI and Pip are the most common contenders but there are some other options available as well.

  8. Stage 8: Iterators

    • Iterators

      An iterator is an object that contains a countable number of values. An iterator is an object that can be iterated upon, meaning that you can traverse through all the values. Technically, in Python, an iterator is an object which implements the iterator protocol, which consist of the methods iter() and next() .

  9. Stage 9: Common Packages

    • Common Packages

      Python has a rich ecosystem of packages and modules that can be used to get the most out of the language. A package is essentially a directory that contains multiple modules and subpackages. A module is a single file that contains a collection of related functions, classes, and variables. Modules are the basic…

  10. Stage 10: Regular Expressions

    • Regular Expressions

      A regular expression is a sequence of characters that specifies a search pattern in text. Usually such patterns are used by string-searching algorithms for "find" or "find and replace" operations on strings, or for input validation.

  11. Stage 11: Variable Scope

    • Variable Scope

      Variable scope refers to the region of a program where a particular variable can be accessed. It determines the visibility and lifetime of a variable. Understanding scope is crucial for avoiding naming conflicts and ensuring that variables are used correctly within different parts of your code.

  12. Stage 12: Object Oriented Programming

    • Object Oriented Programming

      In Python, object-oriented Programming (OOPs) is a programming paradigm that uses objects and classes in programming. It aims to implement real-world entities like inheritance, polymorphism, encapsulation, etc., in programming. The main concept of OOPs is to bind the data and the functions that work on that…

    • pyproject.toml

      This file is used to define the project configuration and dependencies. It is a configuration file that contains metadata about the project, such as its name, version, dependencies, and build settings. The pyproject.toml file is used by tools like poetry and flit to manage Python projects and their dependencies.

  13. Stage 13: List Comprehensions

    • List Comprehensions

      List comprehensions are a concise way to create a list using a single line of code in Python. They are a powerful tool for creating and manipulating lists, and they can be used to simplify and shorten code.

  14. Stage 14: Generator Expressions

    • Generator Expressions

      Generator expressions are a concise way to create a generator using a single line of code in Python. They are similar to list comprehensions, but instead of creating a list, they create a generator object that produces the values on-demand, as they are needed. Generator expressions are a useful tool for efficiently…

  15. Stage 15: Paradigms

    • Paradigms

      Paradigms are fundamental styles or approaches to programming that dictate how a developer organizes and executes code. They define the structural logic of a program, offering different ways to solve problems by choosing how to represent data and functions. In Python, these paradigms—such as object-oriented,…

  16. Stage 16: Context Manager

    • Context Manager

      Context Managers are a construct in Python that allows you to set up context for a block of code, and then automatically clean up or release resources when the block is exited. It is most commonly used with the with statement.

    • Classes

      A class is a user-defined blueprint or prototype from which objects are created. Classes provide a means of bundling data and functionality together. Creating a new class creates a new type of object, allowing new instances of that type to be made. Each class instance can have attributes attached to it for…

    • Methods

      Methods are functions defined within a class that describe the behaviors or actions an object can perform. Dunder methods, short for "double underscore" methods, are special built-in methods—such as init or str—that allow you to define how your objects interact with Python’s built-in operations and syntax. By…

    • Inheritance

      Inheritance is a fundamental concept in object-oriented programming where a new class (the child class or subclass) is derived from an existing class (the parent class or superclass). The child class inherits attributes and methods from the parent class, allowing for code reuse and the creation of hierarchical…

    • Encapsulation

      Encapsulation is a way to bundle data (attributes) and the methods that operate on that data into a single unit, known as a class. It restricts direct access to some of the object's components and prevents the accidental modification of data. This is achieved by declaring some attributes or methods as private,…

    • Pipenv

      Pipeline Environment (pipenv) is a tool that aims to bring the best of all packaging worlds (bundled, requirements.txt, setup.py, setup.cfg, etc.) to the Python world. It automatically creates and manages a virtualenv for your projects, as well as adds/removes packages from your Pipfile as you install/uninstall…

    • virtualenv

      virtualenv is a tool to create isolated Python environments. It creates a folder which contains all the necessary executables to use the packages that a Python project would need.

    • pyenv

      pyenv is a tool for managing multiple versions of the Python programming language on Unix-like systems. It works by setting environment variables to point to the directory where the desired version of Python is installed. This allows you to switch between different versions of Python without having to modify your…

  17. Stage 19: Static Typing

    • Static Typing

      Static typing can be a powerful tool to help you catch bugs before they happen. It can also help you understand the code you're working with, and make it easier to maintain and refactor.

    • typing

      The typing module provides support for type hints in Python, allowing developers to specify expected data types for variables, function parameters, and return values. Type hints improve code readability, enable better editor support and static analysis, and help catch potential bugs early without changing how…

    • mypy

      mypy is an optional static type checker for Python that aims to combine the benefits of dynamic (or "duck") typing and static typing. Mypy combines the expressive power and convenience of Python with a powerful type system and compile-time type checking. Mypy type checks standard Python programs; run them using any…

    • pyright

      pyright is a static type checker for Python. It is a Microsoft product and is written in TypeScript. It is a language server that uses the Language Server Protocol (LSP) to communicate with the editor. It is a good alternative to mypy and pytype.

    • pyre

      pyrefly is a static type checker for Python. It is a tool that helps you find type errors in your Python code. Pyre is designed to be fast, scalable, and easy to use. It is used at Facebook to help developers catch type errors before they make it to production.

    • Pydantic

      Pydantic is a Python library for data validation and settings management using Python type annotations. It enforces type hints at runtime and provides clear, user-friendly error messages when data is invalid. Pydantic is widely used in FastAPI for request body parsing, and in CLI and configuration tools for parsing…

  18. Stage 17: Learn a Framework

    • Learn a Framework

      Frameworks automate the common implementation of common solutions which gives the flexibility to the users to focus on the application logic instead of the basic routine processes. Frameworks make the life of web developers easier by giving them a structure for app development. They provide common patterns in a web…

  19. Stage 18: Concurrency

    • Concurrency

      Concurrency in Python allows multiple tasks to be executed simultaneously using different approaches. GIL (Global Interpreter Lock) limits thread execution, making multithreading less efficient for computational tasks, but suitable for I/O. Multiprocessing, using the multiprocessing module, allows multiple cores to…

    • Multiprocessing

      Multiprocessing utilizes multiple processes, each with its own GIL. This allows full utilization of multiple processor cores, which is effective for computationally intensive tasks. Python's multiprocessing module supports creating processes and exchanging data between them.

    • Asynchrony

      Asynchronous programming, supported by asyncio, allows code to be executed without blocking, using async and await. This is especially useful for I/O tasks such as networking or file manipulation, allowing thousands of connections to be handled without blocking the main thread.

    • GIL

      GIL is a mechanism that allows only one thread to execute Python code at a time. This limitation is related to memory management in CPython and can reduce the efficiency of multithreaded applications on multi-core systems.

    • Threading

      Multithreading allows multiple threads within a single process. However, because of GIL, threads cannot run in parallel on different cores, which makes multithreading suitable for I/O tasks (e.g., network requests) but not for computational tasks.

  20. Stage 20: Code Formatting

    • Code Formatting

      Python code formatting is crucial for maintaining readability, consistency, and reducing errors. Black is a code formatter for Python. It is a tool that automatically formats Python code to adhere to the PEP 8 style guide. It is a great tool to use in your Python projects to ensure that your code is formatted…

    • yapf

      yapf is a formatter for Python files. It is a tool that automatically formats Python code to conform to the PEP 8 style guide. It is similar to black but has more configuration options.

    • black

      Black is a python code formatter that automatically formats code according to a consistent style. By removing formatting decisions from developers, Black helps maintain uniform codebases, improves readability, and reduces time spent on style discussions during code reviews.

    • ruff

      Ruff is a fast Python linter and code quality tool written in Rust that combines the functionality of multiple linting and formatting tools into a single, high-performance utility. It helps detect errors, enforce coding standards, and improve code quality while running significantly faster than traditional Python…

  21. Stage 21: File Handling

    • File Handling

      File handling in Python involves reading data from and writing data to files. It allows programs to interact with files stored on a computer's storage. You can open files in different modes like read, write, or append, and then perform operations like reading the entire file content, reading line by line, or…

    • glob

      The glob module in Python is a handy tool for finding files and directories whose names match a specific pattern. It uses Unix shell rules for pattern matching, allowing you to easily search for files with certain extensions, files starting with a particular name, or any other combination of criteria you define…

    • Plotly Dash

      Plotly Dash is a Python framework that allows you to build analytical web applications. It's a high-level library that enables you to create interactive, web-based data visualization dashboards without requiring extensive knowledge of web development.

    • gevent

      gevent is a Python library that provides a high-level interface to the event loop. It is based on non-blocking IO (libevent/libev) and lightweight greenlets. Non-blocking IO means requests waiting for network IO won't block other requests; greenlets mean we can continue to write code in synchronous style.

    • aiohttp

      aiohttp is a Python 3.5+ library that provides a simple and powerful asynchronous HTTP client and server implementation.

    • Pyramid

      Pyramid is a general, open source, web application development framework built in python. It allows python developer to create web applications with ease. Pyramid is backed by the enterprise knowledge Management System KARL (a George Soros project).

    • Tornado

      Tornado is a scalable, non-blocking web server and web application framework written in Python. It was developed for use by FriendFeed; the company was acquired by Facebook in 2009 and Tornado was open-sourced soon after.

    • Sanic

      Sanic is a Python 3.8+ web server and web framework designed for speed. It fully supports the async/await syntax introduced in Python 3.5, allowing you to write non-blocking request handlers that can handle thousands of concurrent connections efficiently. Unlike traditional synchronous frameworks, Sanic uses uvloop…

    • Sphinx

      Sphinx is a tool that makes it easy to create intelligent and beautiful documentation, written by Georg Brandl and licensed under the BSD license.

    • Fast API

      FastAPI is a modern Python web framework used for building APIs with high performance and automatic documentation. It leverages Python type hints for request validation, serialization, and editor support, making API development faster and less error-prone. FastAPI is commonly used for backend services,…

    • Django

      Django is a free and open-source, Python-based web framework that follows the model–template–views architectural pattern. It is maintained by the Django Software Foundation, an independent organization established in the US as a 501 non-profit

    • Flask

      Flask is a micro web framework written in Python. It is classified as a microframework because it does not require particular tools or libraries. It has no database abstraction layer, form validation, or any other components where pre-existing third-party libraries provide common functions. Instead, it provides…

  22. Stage 22: Testing

    • Testing

      Testing in programming means checking if your code works as expected. It's a systematic way to find and fix errors (bugs) before your code goes live. Imagine building a beautiful house without checking if the walls are straight or the roof doesn't leak—that's what coding without testing can feel like!

    • tox

      Tox is a tool for automating test environment management and testing against multiple interpreter configurations. It is particularly useful for Python codebase that need to support multiple versions of Python.

    • unittest / pyUnit

      PyUnit is an easy way to create unit testing programs and UnitTests with Python. (Note that docs.python.org uses the name "unittest", which is also the module name.)

    • doctest

      Python’s standard library comes equipped with a test framework module called doctest. The doctest module programmatically searches Python code for pieces of text within comments that look like interactive Python sessions. Then, the module executes those sessions to confirm that the code referenced by a doctest runs…

    • pytest

      pytest is a mature full-featured Python testing tool that helps you write better programs.

Questions about the Python Roadmap

Is the Python Roadmap free?

Yes. All 85 lessons in this roadmap are free to read on Bibha AI Learning Labs, with no account and no payment. Signing in is optional: it lets you mark lessons as done and keep your progress, and it opens the AI tutor, which runs on your own API key.

How long does the Python Roadmap take?

There is no fixed duration. It has 85 lessons in 22 stages, and the time it takes depends on how many hours you give it each week. Nothing is locked, so you can skip what you already know, and your progress is saved once you sign in.

Where should I start the Python Roadmap?

Start with stage 1, Learn the Basics, and work down in order. The stages are numbered in the order the roadmap suggests, but every lesson is open, so if you already know Learn the Basics you can go straight to Data Structures & Algorithms or anything after it. Each lesson links to free resources for going deeper.

Can I learn Python in Hindi?

The lessons are written in English. Once you sign in, you can ask the AI tutor on any lesson to explain it in Hindi or Hinglish. It answers from that lesson’s own text, so the explanation stays on the syllabus. The tutor runs on your own Google, OpenAI or Anthropic key.

Still confused? Ask me