Learn Python Roadmap: 24-Week Plan With Projects
12 min read ยท 2026-11-06
To learn Python, follow six phases in this order. Start with setup and core syntax. Then learn data structures, functions and files. Next come classes, modules and testing, then libraries and APIs, then one specialization. Finish with a capstone project you deploy and explain. At about 7 hours a week, this learn python roadmap takes around 24 weeks, and each phase ends with a small project that proves you can move on.
This guide is for complete beginners. It is also for people who need Python for their job: an analyst tired of copying spreadsheets, a project manager who wants weekly reports to build themselves, an ops or marketing lead with a stack of CSV exports. You get the full roadmap, three weekly schedules, a branch for data, AI, backend and automation, a short version for work, and a simple way to present your plan to a manager.
The roadmap at a glance
Goal: Write, test and ship a useful Python project on your own, without following a tutorial. Duration: 24 weeks at about 7 hours per week (around 12 weeks at 15 hours, around 12 months at 3 hours)
Setup and Basics (Weeks 1 to 3)
Get a working environment and write your first real programs.
- Install a currently supported Python 3 release and VS Code with the Python extension, then run a script from the terminal.
- Learn variables, numbers, strings, booleans and type conversion with short daily exercises.
- Control program flow with if, elif, else, for loops and while loops.
- Read user input and format output with f-strings.
- Create a GitHub repository on day one and commit every exercise to it.
Milestone: A number guessing game and a tip calculator, written from scratch and pushed to GitHub.
Data Structures, Functions and Files (Weeks 4 to 8)
Learn to organize data and logic so your scripts handle real input.
- Write functions with parameters, default values, return values and docstrings.
- Use lists, tuples, dictionaries and sets, and pick the right one for each job.
- Read and write text, CSV and JSON files with the with statement and pathlib.
- Handle errors with except, else and finally blocks, and raise your own exceptions.
- Use standard library modules such as datetime, collections and csv.
Milestone: An expense tracker that reads a CSV, saves data to JSON and prints a monthly summary.
Objects, Modules and Tooling (Weeks 9 to 12)
Structure bigger programs and work like a professional developer.
- Create classes with attributes, methods and inheritance, and add a __str__ method.
- Split code into modules and packages with a clear folder layout.
- Give every project its own virtual environment with venv and pip, or with uv.
- Use Git branches and write clear commit messages.
- Write unit tests with pytest, including fixtures and parametrized tests.
Milestone: The expense tracker rebuilt as a package with classes and a passing pytest suite.
Libraries, APIs and Clean Code (Weeks 13 to 16)
Connect Python to the outside world and write code others can read.
- Call web APIs with requests or httpx and parse the JSON response.
- Process data lazily with iterators and generators.
- Add type hints and check them with mypy or Pyright.
- Represent structured data with dataclasses.
- Format and lint your code automatically with Ruff.
Milestone: A tested command-line tool that pulls data from a public API and passes Ruff and mypy with no errors.
Specialization Track (Weeks 17 to 21)
Pick one domain and learn the libraries that matter there.
- Choose one path: data analysis, AI and machine learning, backend web, or automation.
- Work through the official tutorial of the main library or framework of that path, end to end.
- Connect a database with SQLite or PostgreSQL.
- Build two small projects in that domain before starting the capstone.
Milestone: Two working projects in your chosen domain, each with a README that explains how to run it.
Capstone and Proof (Weeks 22 to 24)
Ship one substantial project and show it to someone.
- Pick a problem you or your team actually have and scope it to three weeks.
- Build it with tests, type hints and a clean folder structure.
- Deploy it (a web host, a scheduled job or a published package) or hand it to a real user.
- Write a README with the problem, the setup steps and a short demo.
Milestone: A deployed or delivered project, in a public repository, that you can explain line by line in ten minutes.
Python Roadmap for Beginners: Install the Right Version First
The first decision is which Python to install, and many old tutorials get it wrong. Before you install anything, open the official status page of the Python developer guide at devguide.python.org/versions. It lists every Python 3 release, whether it still gets fixes, and when its support ends. Pick a currently supported 3.x release, ideally a recent one. Python 3.10 is at or near end of life, so skip any course that asks you to install it. Never follow Python 2 material: the syntax is different and the version is long retired.
For a roadmap for beginners with Python, keep the setup boring and stable. Install Python from python.org (or with your system package manager on Linux), install VS Code and its Python extension, and check that typing python or python3 in a terminal starts the right version. If a library you need does not support the newest release yet, install the one just before it, as long as the status page still shows it as supported. The goal is a setup you never have to think about again.
- Windows: tick the option that adds Python to PATH during install.
- Mac: use the python.org installer or Homebrew, and run python3 rather than python.
- Any system: create a virtual environment for every project from the first week of phase three, earlier if you install packages.
How Many Hours per Week: Three Schedules That Work
Most Python roadmaps give months but never hours, which is why people fall behind and quit. Pick the rhythm you can really hold, then stretch or compress the phases. A short daily session beats one long weekly one, because you forget less between sessions. Half an hour a day adds up to roughly the 3 hour track below.
Whatever the rhythm, split each week the same way. Spend about a third on new material, about half writing code, and the rest fixing and rereading what you wrote. If you miss a week, do not restart from zero. Go back to the last milestone you finished, rerun that project, and continue from there.
- 3 hours a week (about 12 months): double the length of every phase. Three sessions of one hour, for example Monday, Wednesday and Saturday. Good for a busy professional who needs steady progress, not speed.
- 7 hours a week (about 24 weeks): the default plan above. One hour on four weekdays and a three hour block at the weekend for the phase project.
- 15 hours a week (about 12 weeks): halve every phase. Two hours on weekdays and five at the weekend. Realistic between jobs or during a quiet season at work.
Python Learning Roadmap for Data Analyst, AI, Backend and Automation
Specialize after the core, not before. The first four phases are the same for everyone, and the language skills carry over to every path. Basics come first, intermediate topics next, and only then one specialization. Pick one branch for weeks 17 to 21 and stay with it until the capstone.
If you are unsure, choose the path whose first project you would use next week. People who like questions and numbers usually enjoy data. People who like products enjoy backend. People who want hours back at work start with automation, because the payoff comes fastest.
- Data analyst: pandas, Jupyter, Matplotlib or Plotly, and SQL. First project: clean a messy export and produce a weekly chart.
- AI and machine learning (roadmap AI Python): NumPy first, then pandas and scikit-learn, then PyTorch once linear algebra and statistics feel familiar. A NumPy roadmap is short: arrays, indexing, broadcasting, vectorized math, then random sampling.
- NLP: spaCy for text processing, then the Hugging Face transformers library for pretrained models. First project: classify support tickets or summarize feedback.
- Backend web (Python backend roadmap): FastAPI for APIs or Django for full sites with login and admin, plus SQLAlchemy or the Django ORM, PostgreSQL and Docker.
- Automation: pathlib, openpyxl for Excel files, Playwright for browser tasks, and a scheduler such as cron or Windows Task Scheduler.
The Short Version for Learning Python at Work
Not everyone needs to become a developer. If Python is a tool for your current job, you can compress the plan to about 10 weeks at 3 to 4 hours a week. Do phase one in two weeks and phase two in four weeks. Then spend four weeks on a single work project, and skip classes and advanced tooling until you need them. Add tests as soon as anyone else relies on your script.
Pick the project from a task you repeat every week. Then the learning time also pays for itself.
Keep the script in a shared repository, write a three line README, and run it in front of a colleague. That demo is your milestone.
- Analyst: merge the same three CSV exports every Monday and produce one clean summary file.
- Project manager or PMO: read a task export from Jira or another tool, count overdue items per owner, and write a status table into Excel.
- Ops: rename, sort and archive incoming files, and log what changed.
- Marketing: combine campaign exports, compute cost per result per channel, and save a weekly chart.
- HR: check a headcount spreadsheet for missing fields before it goes to payroll.
How to Present Your Python Learning Plan to a Manager
If you want time or budget to learn Python during work hours, a one page plan is easier to approve than a vague request. Managers want to know what changes for the team and when they will see it, not which course you picked.
Put five things on that page, in the order below. Then review the plan with your manager at each milestone. If a phase takes longer, move the dates openly instead of quietly falling behind. A plan that adapts and keeps delivering builds more trust than one that looked perfect on day one.
- Goal: the work problem the skill solves, in one sentence.
- Time: hours per week and the total duration, using one of the three schedules above.
- Phases: the phases you will cover, each with its dates.
- Milestones: one visible deliverable per phase, with a first useful script by week 8.
- Outcome: what the team gets at the end, such as a report that runs on its own every Monday.
Python Learning Roadmap PDF: Keep a Printable Version
A lot of people look for a Python learning roadmap as a PDF so they can print it or pin it next to their desk. The simplest way is to copy the phases and milestones above into a document, keep it on one page, and use the print to PDF option of your browser or editor. One page matters: if the plan does not fit, it is too detailed to follow.
Put the plan where you see it every day. Tick each milestone when its project is on GitHub, not when you finish watching a lesson. Write your weekly hours next to each phase, so you can tell at a glance whether you are on schedule. Update the file when you change path, so it always shows the plan you are actually following.
Practice Projects by Level
Projects are where the knowledge sticks. After the basic syntax, do a couple of guided projects, then build a few projects of your own that each show a different skill. Each project should sit a little past your comfort zone and solve something you care about, because motivation fades quickly on toy examples.
Rebuild old projects as you learn. Turning the expense tracker from dictionaries into dataclasses, then adding tests and type hints, shows you how much you have improved. It also gives you a portfolio piece with a visible history.
- Beginner: quiz game, password maker, unit converter, to-do list in the terminal.
- Intermediate: file organizer, web scraper with Beautiful Soup, dashboard fed by a public API.
- Advanced: FastAPI service with a database and login, data pipeline that runs on a schedule, a package published to PyPI.
- Work: any script that removes a task you do every week.
Resources by Type
Use few resources and finish them. The official tutorial at docs.python.org is short and accurate, and worth reading next to any course. Automate the Boring Stuff with Python is free to read online and built around practical scripts. Python Crash Course ends with full projects. Once you are past the basics, Fluent Python goes deep on clean, idiomatic code.
For practice, the Exercism Python track gives mentored exercises, and Advent of Code puzzles train problem solving. Real Python publishes detailed tutorials on single topics such as decorators or asyncio. Videos help when a concept will not click, but always close the video and rebuild the example yourself before moving on.
How to Know You Are Ready
You have finished the roadmap when you can start from an empty folder, create a virtual environment, structure modules, write tests, read library documentation, and debug an error by reading the traceback rather than pasting it somewhere. Explaining your code clearly to someone else is another strong sign.
A practical test: choose an idea you have never seen a tutorial for and build it in a weekend. If you get stuck on design rather than on syntax, you are past the beginner stage. From there, progress comes from reading other people's code, contributing to open source and building larger projects. How fast you get there depends more on steady hours than on talent, so keep to the schedule you picked.
Common mistakes to avoid
- Watching tutorials without coding along gives false confidence, so pause every lesson and rebuild the example from memory.
- Jumping from course to course resets your progress each time, so pick one main resource per phase and finish it.
- Installing packages globally causes version conflicts, so create a virtual environment for every project.
- Following old material teaches outdated habits, so check that each resource uses a supported Python 3 release.
- Starting machine learning before the core leads to confusion, so finish phases one to four before any model.
- Leaving tests for the end makes every change risky, so write pytest tests from phase three onward.
Frequently asked questions
How long does it take to learn Python?
At about 7 hours a week, this roadmap takes around six months from first script to a deployed project. The core syntax and data structures take the first two months of the plan. At 3 hours a week, count about a year. At 15 hours, about three months.
Do I need to know programming before learning Python?
No. Python is a good first language because its syntax reads almost like plain English and its error messages point to the line that failed. You only need basic arithmetic and logic. Math becomes useful later if you choose data science or AI.
Is this a Python learning roadmap for beginners with no experience?
Yes. Phase one assumes you have never written code and starts with installation and your first script. Each phase ends with a project small enough to finish, so you always know whether you are ready to move on.
Should I choose data, web, automation or AI first?
Choose the path whose first project you would use right away. Automation and data analysis pay off fastest for people already in a job. Backend suits people who want to build products. AI needs the strongest core, so keep it for after phase four.
How many projects do I need for a portfolio?
There is no magic number. A few projects that each show a different skill beat a long list of similar ones. Each one should solve a real problem, have tests and a clear README, and show something the others do not.